id
int64
0
6k
code
stringlengths
4k
8k
code_compressed
null
200
import pytest, py import re def exvalue(): import sys return sys.exc_info()[1] def f(): return 2 def test_assert(): try: assert f() == 3 except AssertionError: e = exvalue() s = str(e) assert s.startswith('assert 2 == 3\n') def test_assert_within_finally(): e...
null
201
from __future__ import annotations from collections import defaultdict from typing import Dict, Iterable, Set, Tuple, TypeVar, Union from pharmpy.deps import sympy from pharmpy.internals.expr.subs import subs from pharmpy.internals.expr.tree import prune from pharmpy.internals.graph.directed.reachability import reach...
null
202
#!/usr/bin/python3 # -*- coding: utf-8 -*- # # «recovery_xml» - Helper Class for parsing and using a bto.xml # # Copyright (C) 2010-2011, Dell Inc. # # Author: # - Mario Limonciello <Mario_Limonciello@Dell.com> # # This is free software; you can redistribute it and/or modify it under # the terms of the GNU General Pub...
null
203
# coding=utf-8 # Copyright 2018-2023 EvaDB # # 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 t...
null
204
# 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...
null
205
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2021-2023 Valory AG # # 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...
null
206
#!/usr/bin/python ''' Copyright (c) 2020, dataJAR Ltd. 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 ...
null
207
import requests from plugin import plugin, require from colorama import Fore from bs4 import BeautifulSoup @require(network=True) @plugin("food recipe") def getChoices(jarvis, s): """ function gets the choice of the type of cuisine the user wants. user must get an api key from https://spoonacular.com/foo...
null
208
# 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...
null
209
# coding=utf-8 # Copyright 2023 The TensorFlow Datasets 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 appl...
null
210
import io import random import math import IMP import IMP.test import IMP.atom import IMP.core from test_coulomb import place_xyzs def make_test_pair_score(min_distance=9.0, max_distance=10.0): m = IMP.Model() p0 = m.add_particle("p0") sph = IMP.algebra.Sphere3D(IMP.algebra.Vector3D(0, 0, 0), 1.0) IM...
null
211
# # Copyright (c) 2018-2020 Red Hat, Inc. # # This file is part of nmstate # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 2.1 of the License, or # (at your option) any l...
null
212
import json from bs4 import BeautifulSoup from puppetboard import app from test import MockDbQuery def test_radiator_view(client, mocker, mock_puppetdb_environments, mock_puppetdb_default_nodes): query_data = { 'nodes': [[{'count': 10}]], 'resources'...
null
213
# 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...
null
214
"""Datumaro Helper.""" # Copyright (C) 2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 # # pylint: disable=invalid-name import os from typing import List, Optional, Tuple, Union import datumaro from datumaro.components.dataset import Dataset, DatasetSubset from datumaro.components.dataset_base import Da...
null
215
import random from base_test import ArkoudaTest from context import arkouda as ak from arkouda import client_dtypes class ClientDTypeTests(ArkoudaTest): """ Note: BitVector operations are not tested here because the class is only a wrapper on a pdarray to display as such. The class does not actually...
null
216
# 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...
null
217
# Copyright (c) ZenML GmbH 2022. 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: # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
null
218
# coding=utf-8 # Copyright 2018-2023 EvaDB # # 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 t...
null
219
################################################################################ # Creme is a free/open-source Customer Relationship Management software # Copyright (C) 2020-2022 Hybird # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General P...
null
220
# 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...
null
221
# Copyright 2021-2023 AIPlan4EU 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 agreed to i...
null
222
"""Tests for Action Classification Task with OTX CLI""" # Copyright (C) 2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 # import os import copy from copy import deepcopy import pytest import torch from otx.api.entities.model_template import parse_model_template from otx.cli.registry import Registry from...
null
223
# Copyright (c) 2022 The Regents of the University of California # 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 # notice, this lis...
null
224
#!/usr/bin/env python3 # Copyright (c) 2013 ARM Limited # All rights reserved # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementatio...
null
225
# 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...
null
226
import json import logging from types import GeneratorType import pytest from pypuppetdb.errors import EmptyResponseError from requests import Response from requests.exceptions import ConnectionError, HTTPError from werkzeug.exceptions import InternalServerError, NotFound from puppetboard import app from puppetboard ...
null
227
from django.urls import NoReverseMatch from rest_framework import exceptions as drf_exceptions from rest_framework import versioning as drf_versioning from rest_framework.compat import unicode_http_header from rest_framework.utils.mediatypes import _MediaType from distutils.version import StrictVersion from api.base i...
null
228
# 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...
null
229
# Copyright 2017-2020 EPAM Systems, Inc. (https://www.epam.com/) # # 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...
null
230
import calendar from flask import make_response, Response from flask_appbuilder import expose, has_access, permission_name from flask_appbuilder import ModelView from flask_appbuilder.charts.views import GroupByChartView from flask_appbuilder.models.group import aggregate_count from flask_appbuilder.models.mongoengine...
null
231
import subprocess from error_codes import * from errors import error_info from helpers import geninfo_lookup, find_dce SSL_CMD = "echo | openssl s_client -connect {0}:443 -brief" CURL_CMD = "curl -s -S -k https://{0}/ping" GLOBAL_HANDLER_URL = "global.handler.control.monitor.azure.com" REGION_HANDLER_URL = ...
null
232
""" Use nextclade QC to produce a list of sequences to be excluded. """ import argparse import numpy as np import pandas as pd from datetime import datetime, timedelta def isfloat(value): try: float(value) return True except ValueError: return False def METHOD_NAME(x, minus_weeks=0): ...
null
233
# Copyright (c) ZenML GmbH 2022. 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: # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
null
234
# 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...
null
235
"""Constructors for concrete tool and input source objects.""" import logging from typing import ( Callable, Dict, List, Optional, ) from yaml import safe_load from galaxy.tool_util.loader import load_tool_with_refereces from galaxy.util import ( ElementTree, parse_xml_string_to_etree, ) from...
null
236
"""Test singularity{,-ce} & apptainer versions.""" from subprocess import check_output # nosec import cwltool.singularity from cwltool.singularity import ( get_version, is_apptainer_1_or_newer, is_version_2_6, is_version_3_1_or_newer, is_version_3_4_or_newer, is_version_3_or_newer, ) def res...
null
237
import os import pytest import mock import shutil import tempfile import xml from future.moves.urllib.parse import urljoin from scripts import generate_sitemap from osf_tests.factories import (AuthUserFactory, ProjectFactory, RegistrationFactory, CollectionFactory, PreprintFactory, Pr...
null
238
# 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...
null
239
# 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...
null
240
from lm_eval.utils import get_rolling_token_windows, make_disjoint_window # noinspection DuplicatedCode def test_get_rolling_token_windows_v1(): gold = [ ([-100, 0, 1, 2, 3, 4, 5, 6, 7, 8], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]), ( [9, 10, 11, 12, 13, 14, 15, 16, 17, 18], [10, 11,...
null
241
import argparse import csv import re from django.core.management import BaseCommand from pola.company.models import Brand, Company from pola.management.command_utils import ask_yes_no from pola.product.models import Product def update_product(self, brand, ean_code, company, product_name): product = Product.obje...
null
242
# coding=utf-8 from tests import unittest from mock import MagicMock, patch, Mock from aliyunsdkcore.endpoint.location_service_endpoint_resolver \ import LocationServiceEndpointResolver from aliyunsdkcore.endpoint.resolver_endpoint_request import ResolveEndpointRequest from aliyunsdkcore.acs_exception.exception...
null
243
# # junitxml: extensions to Python unittest to get output junitxml # Copyright (C) 2009 Robert Collins <robertc@robertcollins.net> # # Copying permitted under the LGPL-3 licence, included with this library. """unittest compatible JUnit XML output.""" import datetime import re import time import unittest # same f...
null
244
# License: MIT # Copyright © 2023 Frequenz Energy-as-a-Service GmbH """Tests for the moving window.""" import asyncio from collections.abc import Iterator, Sequence from datetime import datetime, timedelta, timezone import async_solipsism import numpy as np import pytest import time_machine from frequenz.channels im...
null
245
from arm.logicnode.arm_nodes import * class MathNode(ArmLogicTreeNode): """Mathematical operations on values.""" bl_idname = 'LNMathNode' bl_label = 'Math' arm_version = 3 @staticmethod def METHOD_NAME(obj, prop_name, value): return obj.bl_rna.properties[prop_name].enum_items[value].id...
null
246
""" @file @brief This file contains the project file listview, used by the main window @author Noah Figg <eggmunkee@hotmail.com> @author Jonathan Thomas <jonathan@openshot.org> @section LICENSE Copyright (c) 2008-2018 OpenShot Studios, LLC (http://www.openshotstudios.com). This file is part of OpenShot Video ...
null
247
"""Misc. useful functions that can be used at many places in the program.""" import os import subprocess as sp import warnings import proglog OS_NAME = os.name def cross_platform_popen_params(popen_params): """Wrap with this function a dictionary of ``subprocess.Popen`` kwargs and will be ready to work wit...
null
248
# 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...
null
249
from typing import Any, Callable, Dict, Optional from urllib.parse import urlparse from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.urls import reverse from selenium.webdriver.common.by import By from selenium.webdriver.firefox.webdriver import WebDriver from selenium.webdriver.remot...
null
250
import asyncio from typing import Any, Dict, List, Optional from hummingbot.connector.exchange.injective_v2.injective_query_executor import BaseInjectiveQueryExecutor class ProgrammableQueryExecutor(BaseInjectiveQueryExecutor): def __init__(self): self._ping_responses = asyncio.Queue() self._spo...
null
251
import pytest from api.base.settings.defaults import API_BASE from osf_tests.factories import ( NodeFactory, ProjectFactory, RegistrationFactory, AuthUserFactory, PrivateLinkFactory, ) @pytest.fixture() def user(): return AuthUserFactory() @pytest.fixture() def registration_with_children(use...
null
252
import platform import secrets import signal from pickle import PickleError from typing import Any, Mapping from unittest.mock import AsyncMock, MagicMock import pytest from aiodocker.exceptions import DockerError from ai.backend.agent.docker.agent import DockerAgent from ai.backend.common.docker import ImageRef from...
null
253
# Copyright 2019 Camptocamp (http://www.camptocamp.com). # @author Simone Orsi <simahawk@gmail.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from .common import TestMultiUserCommon class TestMultiUserCustomer(TestMultiUserCommon): """Test interaction with /customer endpoint.""" def te...
null
254
from typing import Optional from AnyQt.QtCore import Qt, QSizeF, QRectF, QPointF from AnyQt.QtGui import QPixmap, QTransform, QPainter from AnyQt.QtWidgets import ( QGraphicsWidget, QGraphicsItem, QStyleOptionGraphicsItem, QWidget, ) from Orange.widgets.utils.graphicslayoutitem import scaled class GraphicsPixmap...
null
255
# Copyright (c) ZenML GmbH 2022. 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: # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
null
256
''' Copyright (C) 2017-2023 Bryant Moscon - bmoscon@gmail.com Please see the LICENSE file for the terms and conditions associated with this software. ''' from collections import defaultdict import asyncio import logging from typing import Optional, ByteString from aiokafka import AIOKafkaProducer from aiokafka.errors...
null
257
# 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...
null
258
import json from json import JSONEncoder from typing import List, Union, cast from typeguard import typechecked from arkouda.client import generic_msg __all__ = [ "AllSymbols", "RegisteredSymbols", "information", "list_registry", "list_symbol_table", "pretty_print_information", ] AllSymbols =...
null
259
import uuid from galaxy.jobs import ( HasResourceParameters, JobDestination, ) from galaxy.jobs.mapper import ( ERROR_MESSAGE_NO_RULE_FUNCTION, ERROR_MESSAGE_RULE_FUNCTION_NOT_FOUND, JobRunnerMapper, ) from galaxy.util import bunch from . import ( test_rules, test_rules_override, ) WORKFLO...
null
260
# 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...
null
261
# Copyright 2017-2022 EPAM Systems, Inc. (https://www.epam.com/) # # 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...
null
262
import pytest import env # noqa: F401 from pybind11_tests import ConstructorStats from pybind11_tests import call_policies as m @pytest.mark.xfail("env.PYPY", reason="sometimes comes out 1 off on PyPy", strict=False) def test_keep_alive_argument(capture): n_inst = ConstructorStats.detail_reg_inst() with cap...
null
263
# 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...
null
264
import logging import os from flask_appbuilder import SQLA from flask_appbuilder.models.sqla.interface import SQLAInterface from .base import FABTestCase from .const import MAX_PAGE_SIZE, PASSWORD_ADMIN, USERNAME_ADMIN from .sqla.models import Model1 log = logging.getLogger(__name__) class FlaskTestCase(FABTestCas...
null
265
from __future__ import print_function import numpy as np try: import scipy.special except ImportError: scipy = None import IMP import IMP.test import IMP.algebra import pickle class UnitSimplexDTests(IMP.test.TestCase): types = [ (1, IMP.algebra.UnitSimplex1D, (), IMP.algebra.Vector1D), ...
null
266
import traceback from shared.regular.regular_api import * from shared.connection.connectors.connectors_base import Connector, with_connection from shared.regular import regular_log from pymongo import MongoClient from bson import ObjectId def with_mongodb_exception_handler(f): def wrapper(*args): log = reg...
null
267
""" Tool Input Translation. """ import logging from galaxy.util.bunch import Bunch log = logging.getLogger(__name__) class ToolInputTranslator: """ Handles Tool input translation. This is used for data source tools >>> from galaxy.util import Params, XML >>> translator = ToolInputTranslator.fr...
null
268
#!/usr/bin/env python # -*- coding: utf-8 -*- # 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 argparse import json import os import re import shutil import subpr...
null
269
########################################################################## # # Copyright (c) 2008, 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: # # * Redistribu...
null
270
import numpy as np from sklearn.base import clone from sklearn.base import BaseEstimator, RegressorMixin from sklearn.ensemble import GradientBoostingRegressor from sklearn.utils import check_random_state from joblib import Parallel, delayed def _parallel_fit(regressor, X, y): return regressor.fit(X, y) class ...
null
271
# 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...
null
272
# 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...
null
273
import pytest from django.test import RequestFactory from osf.models import RegistrationSchema from admin_tests.utilities import setup_view from admin.registration_schemas import views from django.contrib.messages.storage.fallback import FallbackStorage from django.core.files.uploadedfile import SimpleUploadedFile f...
null
274
""" This type stub file was generated by pyright. """ from django.contrib import admin from django.utils.decorators import method_decorator from django.views.decorators.http import require_POST from .mixins import BaseExportMixin, BaseImportMixin class ImportExportMixinBase: def get_model_info(self): ... class ...
null
275
# Copyright 2022 Sony Group 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 ...
null
276
# Copyright 2017,2018,2019,2020,2021 Sony Corporation. # Copyright 2021 Sony Group 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-...
null
277
import re from pathlib import Path from click.testing import CliRunner, Result from ggshield.__main__ import cli from ggshield.core.errors import ExitCode from tests.conftest import ( _IAC_MULTIPLE_VULNERABILITIES, _IAC_NO_VULNERABILITIES, _IAC_SINGLE_VULNERABILITY, ) from tests.unit.conftest import asser...
null
278
from typing import Any, Dict, List, Optional, Tuple from boa3.internal.model.builtin.method.builtinmethod import IBuiltinMethod from boa3.internal.model.type.primitive.ibytestringtype import IByteStringType from boa3.internal.model.variable import Variable from boa3.internal.neo.vm.opcode import OpcodeHelper from boa3...
null
279
# 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...
null
280
# 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...
null
281
#!/bin/python # -*- coding: utf-8 -*- """ Unit tests for gluon.sqlhtml """ import os import sys import unittest from gluon.compileapp import run_controller_in, run_view_in, compile_application, remove_compiled_application from gluon.languages import TranslatorFactory from gluon.storage import Storage, List from...
null
282
from itertools import chain from math import isnan from numbers import Real, Integral import numpy as np from Orange.data import Value, Unknown, DiscreteVariable __all__ = ["Instance"] class Instance: def __init__(self, METHOD_NAME, data=None, id=None): """ Construct a new data instance. ...
null
283
# 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...
null
284
# coding=utf-8 # Copyright 2023 The Uncertainty Baselines 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 ap...
null
285
# coding: utf-8 """ Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator """ import unittest from unittest.mock import patch import urllib3 import typing_extensions import unit_test_api from unit_test_api.paths.request_body_post_oneof_complex_types_request_body.post import op...
null
286
# This file is part of h5py, a Python interface to the HDF5 library. # # http://www.h5py.org # # Copyright 2008-2013 Andrew Collette and contributors # # License: Standard 3-clause BSD; see "license.txt" for full license terms # and contributor agreement. import unittest as ut from h5py import h5p, h5f, ve...
null
287
from boa3_test.tests.boa_test import BoaTest # needs to be the first import to avoid circular imports from boa3.internal.exception import CompilerError from boa3.internal.neo.vm.type.String import String from boa3.internal.neo3.vm import VMState from boa3_test.test_drive.testrunner.neo_test_runner import NeoTestRunne...
null
288
"""Implementation of the CNN Decoder part of "Convolutional Sequence to Sequence Learning" """ import torch import torch.nn as nn from onmt.modules import ConvMultiStepAttention, GlobalAttention from onmt.utils.cnn_factory import shape_transform, GatedConv from onmt.decoders.decoder import DecoderBase SCALE_WEIGHT = ...
null
289
from boa3_test.tests.boa_test import BoaTest # needs to be the first import to avoid circular imports from boa3.internal.exception import CompilerError from boa3.internal.neo.vm.opcode.Opcode import Opcode from boa3.internal.neo3.vm import VMState from boa3_test.test_drive.testrunner.neo_test_runner import NeoTestRun...
null
290
""" Copyright (c) 2023, NVIDIA CORPORATION. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in ...
null
291
# Downloaded from https://github.com/HazyResearch/state-spaces/blob/06dbbdfd0876501a7f12bf3262121badbc7658af/src/models/functional/toeplitz.py """ Utilities for computing convolutions. There are 3 equivalent views: 1. causal convolution 2. multiplication of (lower) triangular Toeplitz matrices 3. polynomial...
null
292
""" Adapted from a code editor component created for Enki editor as replacement for QScintilla. Copyright (C) 2020 Andrei Kopats Originally licensed under the terms of GNU Lesser General Public License as published by the Free Software Foundation, version 2.1 of the license. This is compatible with Orange3's GPL-3.0 ...
null
293
########################################################################## # # Copyright (c) 2008-2009, 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: # # * Redis...
null
294
# Copyright 2019,2020,2021 Sony Corporation. # Copyright 2021 Sony Group 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 # # Un...
null
295
# coding=utf-8 # Copyright 2023 The TensorFlow Datasets 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 appl...
null
296
"""osf/management/commands/metrics_backfill_user_domains.py Usage: $ dc-manage metrics_backfill_user_domains --source=$path_to_csv $ dc-manage metrics_backfill_user_domains --source=$path_to_csv --dry # dry run $ dc-manage metrics_backfill_user_domains --source=$path_to_csv --resume-from 1264 # start from rec...
null
297
import asyncio import functools from decimal import Decimal from typing import Awaitable, Callable, Optional from unittest import TestCase from unittest.mock import AsyncMock from hummingbot.client.config.client_config_map import ClientConfigMap from hummingbot.client.config.config_helpers import ClientConfigAdapter f...
null
298
# Wrapper module for waagent # # waagent is not written as a module. This wrapper module is created # to use the waagent code as a module. # # Copyright 2014 Microsoft Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # Yo...
null
299
###################################################################### # BioSimSpace: Making biomolecular simulation a breeze! # # Copyright: 2017-2023 # # Authors: Lester Hedges <lester.hedges@gmail.com> # # BioSimSpace is free software: you can redistribute it and/or modify # it under the terms of the GNU General Pub...
null