id int64 0 300k | label stringlengths 1 74 ⌀ | text stringlengths 4k 8k |
|---|---|---|
400 | write phenotype file | import csv
import hashlib
import io
import json
import requests
import shutil
from typing import Dict
from typing import List
from typing import Optional
from typing import TextIO
import numpy as np
from base.webqtlConfig import TMPDIR
from base.trait import create_trait
from utility.redis_tools import get_redis_conn... |
401 | set reset address | #
# This file is part of LiteX.
#
# Copyright (c) 2018 Jean-François Nguyen <jf@lambdaconcept.fr>
# Copyright (c) 2018-2019 Florent Kermarrec <florent@enjoy-digital.fr>
# SPDX-License-Identifier: BSD-2-Clause
import os
import subprocess
from migen import *
from litex.gen import *
from litex import get_data_mod
from... |
402 | ishow image2 | # -*- coding: utf-8 -*-
import logging
import utool as ut
import wbia.plottool as pt # NOQA
from wbia.plottool import interact_annotations
print, rrr, profile = ut.inject2(__name__)
logger = logging.getLogger('wbia')
# DESTROY_OLD_WINDOW = True
DESTROY_OLD_WINDOW = False
def METHOD_NAME(ibs, gid, fnum=None, dod... |
403 | create job | import os
import time
from typing import Dict, Union
from kubernetes import client, config
from kubernetes.client.rest import ApiException
from mage_ai.services.k8s.config import K8sExecutorConfig
from mage_ai.services.k8s.constants import DEFAULT_NAMESPACE, KUBE_POD_NAME_ENV_VAR
from mage_ai.shared.hash import merge... |
404 | check handshake timeout | import ssl
import sys
from collections import deque
from collections.abc import Callable
from enum import Enum
from typing import Any, ClassVar
from typing_extensions import Literal, TypeAlias
from . import constants, events, futures, protocols, transports
def _create_transport_context(server_side: bool, server_hostn... |
405 | test non image upload | # Copyright (c) 2012-2016 Seafile Ltd.
import os.path
from django.test import TestCase
from django.urls import reverse
from django.conf import settings
from seahub.base.accounts import User
from seahub.avatar.settings import AVATAR_DEFAULT_URL, AVATAR_MAX_AVATARS_PER_USER
from seahub.avatar.util import get_primary_a... |
406 | test time range indicator 114 | # Copyright iris-grib contributors
#
# This file is part of iris-grib and is released under the LGPL license.
# See COPYING and COPYING.LESSER in the root of the repository for full
# licensing details.
"""Unit tests for :func:`iris_grib._grib1_load_rules.grib1_convert`."""
# Import iris_grib.tests first so that some ... |
407 | get logging | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
408 | check distribution | import copy
import unittest
import numpy as np
from pydrake.common import RandomGenerator
import pydrake.common.schema as mut
import pydrake.math
class TestSchema(unittest.TestCase):
def METHOD_NAME(self, dut):
"""Confirms that a subclass instance of Distribution
* binds the base methods, and
... |
409 | test no optional args | # Copyright Iris contributors
#
# This file is part of Iris and is released under the LGPL license.
# See COPYING and COPYING.LESSER in the root of the repository for full
# licensing details.
"""Unit tests for the :class:`iris.coord_systems.Geostationary` class."""
# Import iris.tests first so that some things can be... |
410 | test preprocess fn returns correct element | # Copyright 2020, 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... |
411 | clone template | # Copyright © Michal Čihař <michal@weblate.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Translate Toolkit based file-format wrappers for multi string support."""
from __future__ import annotations
from django.utils.functional import cached_property
from django.utils.translation import gettext_lazy
from web... |
412 | 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... |
413 | find docs to be removed | import logging
from abc import ABC, abstractmethod
from typing import Any, Dict, List, Optional, Type
import numpy as np
from llama_index.bridge.pydantic import Field
from llama_index.schema import BaseNode, MetadataMode, TextNode
from llama_index.vector_stores.types import (
VectorStore,
VectorStoreQuery,
... |
414 | enhance | import numpy as np
import torch
import torch.nn.functional as F
from torchaudio.transforms import Resample
from .nsf_hifigan.nvSTFT import STFT
from .nsf_hifigan.models import load_model
class Enhancer:
def __init__(self, enhancer_type, enhancer_ckpt, device=None):
if device is None:
device = ... |
415 | complete | """
Utilities for end-users.
"""
from __future__ import absolute_import
import __main__
from collections import namedtuple
import logging
import traceback
import re
import os
import sys
from parso import split_lines
from jedi import Interpreter
from jedi.api.helpers import get_on_completion_name
READLINE_DEBUG = F... |
416 | test amx check support | # 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... |
417 | aborting | """ZMQServer Driver."""
from schema import Use, Or
import zmq
from testplan.common.config import ConfigOption
from testplan.common.utils.documentation_helper import emphasized
from testplan.common.utils.timing import retry_until_timeout
from ..base import Driver, DriverConfig
class ZMQServerConfig(DriverConfig):
... |
418 | last modified | from __future__ import annotations
from itertools import accumulate
from typing import TYPE_CHECKING
from flask import current_app
from sqlalchemy import tuple_, func
from sqlalchemy.orm import defaultload
from timApp.auth.auth_models import BlockAccess
from timApp.auth.get_user_rights_for_item import get_user_right... |
419 | test handle bar updates indicator | # -------------------------------------------------------------------------------------------------
# Copyright (C) 2015-2023 Nautech Systems Pty Ltd. All rights reserved.
# https://nautechsystems.io
#
# Licensed under the GNU Lesser General Public License Version 3.0 (the "License");
# You may not use this file ex... |
420 | create assembly file list | #!/usr/bin/env python3
import os
import sys
import re
import json
from vmaf.core.result import Result
__copyright__ = "Copyright 2016-2020, Netflix, Inc."
__license__ = "BSD+Patent"
def print_usage():
print("usage: python " + os.path.basename(sys.argv[0]) + " input_file\n")
print("input_file contains a li... |
421 | ignore if marked | """
Copyright 2020 The Magma Authors.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES O... |
422 | build list 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... |
423 | get kdb instance | from pathlib import Path
import os, re, errno, sys, subprocess
import kdb
elektra_namespaces = ["user:", "system:", "dir:", "spec:", "cascading:", "proc:"]
parent_key = None # not yet set
dir_file_special_name = "®elektra.value"
xattr_kdb_file = "®elektra.file"
#translates from filesystem (that are below the "pid"-le... |
424 | get market moves for period | ######## DO AS A CACHEING OBJECT
### CREATE A CACHE
from typing import List, Any, Dict
import datetime
import pandas as pd
import numpy as np
from syscore.dateutils import (
get_date_from_period_and_end_date,
get_approx_vol_scalar_versus_daily_vol_for_period,
)
from syscore.cache import Cache
from syscore.con... |
425 | time analysis area weighted | # Copyright Iris contributors
#
# This file is part of Iris and is released under the LGPL license.
# See COPYING and COPYING.LESSER in the root of the repository for full
# licensing details.
from importlib import import_module, reload
################
# Prepare info for reset_colormaps:
# Import and capture colorma... |
426 | extract data | # 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) AutoRest Code Generator.
# Changes may ... |
427 | export mod broadcast | # Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import onnx
from onnx.backend.test.case.base import Base
from onnx.backend.test.case.node import expect
class Mod(Base):
@staticmethod
def export_mod_mixed_sign_float64() -> None:
node = onnx.helper.... |
428 | test support mech | # --- BEGIN COPYRIGHT BLOCK ---
# Copyright (C) 2017 Red Hat, Inc.
# All rights reserved.
#
# License: GPL (version 3 or any later version).
# See LICENSE for details.
# --- END COPYRIGHT BLOCK ---
from lib389.topologies import topology_st_gssapi, gssapi_ack
from lib389.idm.user import UserAccounts
from lib389.saslma... |
429 | xy of hex | import inspect
import numpy as np
import pytest
from pytest import approx
from scipy.spatial import Delaunay, Voronoi
from landlab.graph.voronoi.voronoi_to_graph import (
VoronoiDelaunay,
VoronoiDelaunayToGraph,
)
XY_OF_NODE = {
"rect-horizontal-3-3": [
[0.0, 0.0],
[1.0, 0.0],
[2.... |
430 | show bss | #!/usr/bin/python
import dbus
import sys, os
import time
import gobject
from dbus.mainloop.glib import DBusGMainLoop
WPAS_DBUS_SERVICE = "fi.w1.wpa_supplicant1"
WPAS_DBUS_INTERFACE = "fi.w1.wpa_supplicant1"
WPAS_DBUS_OPATH = "/fi/w1/wpa_supplicant1"
WPAS_DBUS_INTERFACES_INTERFACE = "fi.w1.wpa_supplicant1.Interface"
... |
431 | write string | #!/usr/bin/python3
import argparse
import glob
import os
import time
import random
COLOURS = (b'\xFF\x00\x00', b'\x00\xFF\x00', b'\x00\x00\xFF', b'\xFF\xFF\x00', b'\xFF\x00\xFF', b'\x00\xFF\xFF')
def write_binary(driver_path, device_file, payload):
with open(os.path.join(driver_path, device_file), 'wb') as open... |
432 | break lines | # Copyright 2013-2017 ARM Limited
#
# 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 w... |
433 | 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... |
434 | num samples | import functools
import operator
import os
import os.path
import sys
import numpy as np
# Bamboo utilities
current_file = os.path.realpath(__file__)
current_dir = os.path.dirname(current_file)
sys.path.insert(0, os.path.join(os.path.dirname(current_dir), 'common_python'))
import tools
# ==============================... |
435 | status message | # Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""Query the status of bootstrapping on this machine"""
import platform
from typing import List, Optional, Sequence, Tuple,... |
436 | run fio | # Copyright 2019 PerfKitBenchmarker Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
437 | clear link | """Service for linking the project to Minecraft."""
__all__ = [
"LinkManager",
]
import logging
import os
import platform
from pathlib import Path
from typing import List, Optional, Union
from beet import Cache, CachePin, Context, ErrorMessage, MultiCache, PackOverwrite
from beet.core.utils import FileSystemPa... |
438 | enumerate interfaces from client | #!/usr/bin/env python
"""Windows specific actions.
Most of these actions share an interface (in/out rdfvalues) with linux actions
of the same name. Windows-only actions are registered with the server via
libs/server_stubs.py
"""
import binascii
import logging
import pythoncom
import win32api
import win32com.client
i... |
439 | created date | # 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... |
440 | tostring | import hashlib
import logging
from gettext import gettext as _
from lxml import etree
LOGGER = logging.getLogger(__name__)
LOGGER_FMT = "%(asctime)s [%(levelname)s] %(name)s: %(message)s"
class PidProviderXMLAdapter:
def __init__(self, xml_with_pre, pkg_name=None):
self.xml_with_pre = xml_with_pre
... |
441 | switch widget | # -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see spyder/__init__.py for details)
"""
Main widget to use in plugins that show content that comes from the IPython
console, such as the Variable Explorer or Plots.
"""
# Third party imports
from qtpy.... |
442 | on connect | #############################################
# This is a basic script to emulate the hardware of
# an Arduino microcontroller. The VirtualDevice
# service will execute this script when
# createVirtualArduino(port) is called
import time
import math
import threading
from random import randint
from org.myrobotlab.codec.... |
443 | location | # 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 . imp... |
444 | pre 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
# --------------------------------... |
445 | translate points to crop | # Copyright (C) 2020-2022 Intel Corporation
# Copyright (C) 2022 CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
import numpy as np
import os
import cv2
import torch
from networks.mainnetwork import Network
from dataloaders import helpers
def convert_mask_to_polygon(mask):
contours = None
if int(cv2.__ve... |
446 | test comparison uneven nested | import numpy as np
import pytest
import aesara
from aesara.tensor.type import TensorType
from aesara.typed_list.basic import TypedListVariable
from aesara.typed_list.type import TypedListType
from tests.tensor.utils import random_ranged
class TestTypedListType:
def test_wrong_input_on_creation(self):
# T... |
447 | test tasks handles nonexisting theme | import pytest
from ....cache.test import assert_invalidates_cache
from ... import THEME_CACHE
from ..css import change_css_source, get_theme_media_map, rebuild_css
from ..tasks import build_single_theme_css, build_theme_css
@pytest.fixture
def assert_snapshot_match(snapshot, theme):
def _assert_snapshot_match(re... |
448 | visit func arg list | # Generated from /Users/mep/LocalStack/localstack/localstack/services/stepfunctions/asl/antlr/ASLIntrinsicParser.g4 by ANTLR 4.12.0
from antlr4 import *
if __name__ is not None and "." in __name__:
from .ASLIntrinsicParser import ASLIntrinsicParser
else:
from ASLIntrinsicParser import ASLIntrinsicParser
# This... |
449 | test l3 local parameter id | #
# @file TestL3LocalParameter.py
# @brief L3 Local Parameter unit tests
#
# @author Akiya Jouraku (Python conversion)
# @author Sarah Keating
#
# ====== WARNING ===== WARNING ===== WARNING ===== WARNING ===== WARNING ======
#
# DO NOT EDIT THIS FILE.
#
# This file was generated automatically by converting the... |
450 | get class | # ../memory/__init__.py
"""Provides binary/memory based functionality."""
# =============================================================================
# >> IMPORTS
# =============================================================================
# Python
import inspect
# Source.Python
# Loggers
from loggers impor... |
451 | test read stdout | """
unit tests for the script engine
"""
import contextlib
import logging
import signal
import sys
import pytest
import salt.engines.script as script
from salt.exceptions import CommandExecutionError
from tests.support.mock import Mock, patch
log = logging.getLogger(__name__)
def _check_skip(grains):
if grain... |
452 | setup http manager | from __future__ import annotations
import json
import logging
import os
from abc import abstractmethod
from pathlib import Path
from typing import Any
import urllib3
from checkov.common.util.data_structures_utils import merge_dicts
from checkov.common.util.http_utils import get_user_agent_header
class BaseVCSDAL:
... |
453 | test fulltext index query | import pytest
from resotocore.db import EstimatedSearchCost, EstimatedQueryCostRating
from resotocore.db.arango_query import to_query, query_cost, fulltext_term_combine
from resotocore.db.graphdb import GraphDB
from resotocore.db.model import QueryModel
from resotocore.model.model import Model
from resotocore.query.mo... |
454 | convert token to id | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the Licens... |
455 | apply | # -----------------------------------------------------------------------------
# BSD 3-Clause License
#
# Copyright (c) 2021-2022, Science and Technology Facilities Council
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the foll... |
456 | new | # -----------------------------------------------------------------------------
# Getting Things GNOME! - a personal organizer for the GNOME desktop
# Copyright (c) The GTG Team
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published b... |
457 | solution for delegated puzzle | """
Pay to delegated puzzle or hidden puzzle
In this puzzle program, the solution must choose either a hidden puzzle or a
delegated puzzle on a given public key.
The given public key is morphed by adding an offset from the hash of the hidden puzzle
and itself, giving a new so-called "synthetic" public key which has t... |
458 | get name | # Copyright (c) 2023, 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... |
459 | critical cancel log | from copy import copy
from sysexecution.order_stacks.order_stack import missingOrder
from sysexecution.orders.named_order_objects import missing_order
from syscore.genutils import quickTimer
from sysexecution.stack_handler.stackHandlerCore import stackHandlerCore
from sysexecution.orders.list_of_orders import listOfOr... |
460 | test static bss | #!/usr/bin/env python
import subprocess
from subprocess import Popen
import pytest
import stat
import lief
import pathlib
from utils import get_sample, is_linux, is_x86_64
def test_issue_872(tmp_path):
tmp = pathlib.Path(tmp_path)
elf: lief.ELF.Binary = lief.parse(get_sample('ELF/i872_risv.elf'))
paylo... |
461 | test pickle3 d | import unittest
import numpy as np
import discretize
from discretize.utils import example_simplex_mesh
import os
import pickle
import matplotlib.pyplot as plt
try:
import vtk # NOQA F401
has_vtk = True
except ImportError:
has_vtk = False
class SimplexTests(unittest.TestCase):
def test_init_errors(s... |
462 | process model name | import json
import os
import re
from typing import Dict
import fsspec
import yaml
from coqpit import Coqpit
from TTS.config.shared_configs import *
from TTS.utils.generic_utils import find_module
def read_json_with_comments(json_path):
"""for backward compat."""
# fallback to json
with fsspec.open(json_... |
463 | test query assertions | import unittest
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
MODULE = 'reversinglabs'
def METHOD_NAME(query, queries):
assert isinstance(query, dict) is True
assert 'queries' in query
assert query['queries'] == [queries]
class TestReversingL... |
464 | slack | # coding=utf-8
#####################################################
# THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT #
#####################################################
# noqa: E128,E201
from ..client import BaseClient
from ..client import createApiClient
from ..client import config
from ..client import createT... |
465 | install | """AsyncIO support for zmq
Requires asyncio and Python 3.
"""
# Copyright (c) PyZMQ Developers.
# Distributed under the terms of the Modified BSD License.
import asyncio
import selectors
import sys
import warnings
from asyncio import Future, SelectorEventLoop
from weakref import WeakKeyDictionary
import zmq as _zmq... |
466 | report | #!/usr/bin/env python3
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
#* https://www.gnu.org/licenses/lgp... |
467 | get map of attnum and table oid | import warnings
from sqlalchemy import and_, asc, cast, select, text, exists, Identity
from db.columns.exceptions import DynamicDefaultWarning
from db.connection import execute_msar_func_with_engine
from db.tables.operations.select import reflect_table_from_oid
from db.utils import execute_statement, get_pg_catalog_t... |
468 | simple write csv | import concurrent.futures
import csv
import os
from pathlib import Path
import pandas as pd
from typing import List
from typing import Dict
from utils import df_wide_to_long
from utils import iso3_to_iso2
from utils import make_dir
from utils import write_to_csv
def METHOD_NAME(
output_dir: str = None,
... |
469 | test update weights | import os
import unittest
import torch
import torchvision
from packaging.version import Version
import neural_compressor.adaptor.pytorch as nc_torch
from neural_compressor import PostTrainingQuantConfig, quantization
from neural_compressor.adaptor.torch_utils.model_wrapper import WeightOnlyLinear
from neural_compress... |
470 | test release failure | # SPDX-FileCopyrightText: Red Hat, Inc.
# SPDX-License-Identifier: GPL-2.0-or-later
from __future__ import absolute_import
from __future__ import division
from storage.storagetestlib import FakeGuardedLock
from testlib import VdsmTestCase
from vdsm.storage import guarded
class InjectedFailure(Exception):
pass
... |
471 | sample program configs | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
472 | find max ckpt | import os
from .util import get_ngpu
from .util import MAIN_ROOT
from .util import run_cmd
def METHOD_NAME(model_path):
max_ckpt = 0
for filename in os.listdir(model_path):
if filename.endswith('.pdz'):
files = filename[:-4]
a1, a2, it = files.split("_")
if int(it)... |
473 | test upgrade | """
Nest analysis results field
Revision ID: 7emq1brv0zz6
Date: 2022-06-09 20:38:11.017655
"""
import asyncio
import arrow
# Revision identifiers.
from pymongo import UpdateOne
from virtool_core.mongo import buffered_bulk_writer
from virtool.migration import MigrationContext
name = "Nest analysis results field"
c... |
474 | get | import typing
from collections.abc import MutableSet
from typing import List, Optional, Type, Union
from loguru import logger
from flexget import plugin
from flexget.entry import Entry
from flexget.event import event
PLUGIN_NAME = 'plex_watchlist'
SUPPORTED_IDS = ['imdb_id', 'tmdb_id', 'tvdb_id', 'plex_guid']
logge... |
475 | test reg class | """Tests for distutils.msvc9compiler."""
import sys
import unittest
import os
from distutils.errors import DistutilsPlatformError
from distutils.tests import support
from test.test_support import run_unittest
# A manifest with the only assembly reference being the msvcrt assembly, so
# should have the assembly comple... |
476 | act l 3191 | """
https://github.com/csesoc/Circles/wiki/Manual-Fixes-to-Course-Prerequisites
Copy this into a new file for the relevant faculty's fixes:
e.g. COMPFixes.py, ACCTFixes.py, PSYCFixes.py
Apply manual ACTL fixes to processed conditions in conditionsProcessed.json so
that they can be fed into algorithms.
If you make a ... |
477 | override vddsdio | # SPDX-FileCopyrightText: 2014-2022 Fredrik Ahlberg, Angus Gratton,
# Espressif Systems (Shanghai) CO LTD, other contributors as noted.
#
# SPDX-License-Identifier: GPL-2.0-or-later
from ..loader import ESPLoader
from ..util import FatalError, NotImplementedInROMError
class ESP8266ROM(ESPLoader):
"""Access class... |
478 | get container registry | # 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... |
479 | spark dbfs datasource | from __future__ import annotations
import logging
import os
import pathlib
import re
from typing import TYPE_CHECKING, cast
import boto3
import botocore
import pytest
from great_expectations.core.util import DBFSPath
from great_expectations.datasource.fluent import SparkDBFSDatasource
from great_expectations.datasou... |
480 | get padding | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import Conv1d, ConvTranspose1d
from torch.nn.utils import weight_norm, remove_weight_norm
LRELU_SLOPE = 0.1
def init_weights(m, mean=0.0, std=0.01):
classname = m.__class__.__name__
if classname.find("Conv") != -1:
m.wei... |
481 | create score model set | import json
import os
import pickle
from re import finditer
import pandas
import pandas as pd
from KGToolbox.Tools import MakeIndex
from Marie.Util.Web.SPARQLWarehouse import ONTOKIN_ALL_PROPERTIES_ALL_SPECIES
from Marie.Util.location import DATA_DIR
from KGToolbox.Utils import query_blazegraph
"""
<http://www.thewo... |
482 | test channel properties | # Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy)
# SPDX-License-Identifier: GPL-3.0-or-later
"""
These tests check that the python bindings for the DPInfo class behave correctly.
This script can be invoked in two ways:
- as standalone from the build/pythondp3/test/integration directory,
using... |
483 | splitdrive | """Pathname and path-related operations for the Macintosh."""
import os
import warnings
from stat import *
import genericpath
from genericpath import *
__all__ = ["normcase","isabs","join","splitdrive","split","splitext",
"basename","dirname","commonprefix","getsize","getmtime",
"getatime","getc... |
484 | execute external | import mindsdb_sql
from mindsdb_sql import parse_sql
from mindsdb_sql.planner import utils as planner_utils
from mindsdb.api.mysql.mysql_proxy.classes.sql_query import Column, SQLQuery
from mindsdb.api.mysql.mysql_proxy.utilities import (
ErBadDbError,
SqlApiException,
logger,
)
import mindsdb.utilities.pr... |
485 | minion config | import ctypes
import logging
import multiprocessing
import os
import pathlib
import shutil
import stat
import time
from pathlib import Path
import pytest
from pytestshellutils.utils import ports
from saltfactories.utils import random_string
import salt.channel.client
import salt.channel.server
import salt.config
impo... |
486 | make grid | #!/usr/bin/env nemesis
"""Python application to create spatial databases for a synthetic event with time-varying Gaussian slip.
"""
import math
import numpy
from spatialdata.spatialdb.SimpleGridDB import SimpleGridDB
from spatialdata.spatialdb.SimpleGridAscii import createWriter
from spatialdata.spatialdb import TimeH... |
487 | test create tar gz basic | # 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 hashlib
import os
import shutil
import stat
import tarfile
import tempfile
import unittest
import pytest
from mo... |
488 | main | #!/usr/bin/python
# coding: utf-8 -*-
# (c) 2020, John Westcott IV <john.westcott.iv@redhat.com>
# 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
ANSIBLE_METADATA = {'metadata_version'... |
489 | create jax task | # coding=utf-8
# Copyright 2022 The Pax 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 ag... |
490 | find most distant | """
"""
from SALib.sample.morris.strategy import Strategy
from scipy.special import comb as nchoosek # type: ignore
from itertools import combinations, islice
import sys
import numpy as np # type: ignore
from typing import List
class BruteForce(Strategy):
"""Implements the brute force optimisation strategy"""
... |
491 | pop | import time
from timeit import default_timer
import logging
logger = logging.getLogger(__file__)
from collections import OrderedDict, Counter
def isnotebook():
""" returns True if Jupyter notebook is runnung """
# from https://stackoverflow.com/questions/15411967/how-can-i-check-if-code-is-executed-in-the-ipy... |
492 | test cov args with cov bin | # Copyright 2022 NVIDIA Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... |
493 | test download json | import json
from functools import partial
from unittest import mock
import pytest
from yapapi.ctx import WorkContext
from yapapi.script import Script
class TestWorkContext:
@pytest.fixture(autouse=True)
def setUp(self):
self._on_download_executed = False
@staticmethod
def _get_work_context(... |
494 | parse output | #v 1.0
import sys, os, time, re
import urllib, urllib2
from optparse import OptionParser
from HTMLParser import HTMLParser
from xml.dom.minidom import parseString
#id mapping
def getPDBIdandChain(uniprotID):
#data from http://www.bioinf.org.uk/pdbsws/
dirPath = os.path.dirname(sys.argv[0])
fileName ='pdb_... |
495 | yield all throttles from module | from importlib import import_module
from unittest import mock
from django.conf import settings
from django.contrib.auth.models import AnonymousUser
from django.test.client import RequestFactory
from django.test.utils import override_settings
import pytest
from freezegun import freeze_time
from rest_framework.test imp... |
496 | to str | # 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 use ... |
497 | outputs | """
component_wise_divide_fc
========================
Autogenerated DPF operator classes.
"""
from warnings import warn
from ansys.dpf.core.dpf_operator import Operator
from ansys.dpf.core.inputs import Input, _Inputs
from ansys.dpf.core.METHOD_NAME import Output, _Outputs
from ansys.dpf.core.operators.specification im... |
498 | add to report | # Copyright (c) Facebook, Inc. and its affiliates.
import csv
import json
import logging
import os
import warnings
from dataclasses import dataclass, field
from typing import List
import pytorch_lightning as pl
from mmf.common.registry import registry
from mmf.common.sample import convert_batch_to_sample_list
from mmf... |
499 | toggle logging | # Copyright 2015-2021 Espressif Systems (Shanghai) CO 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 applicable ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.