id int64 0 6k | code stringlengths 4k 8k | code_compressed null |
|---|---|---|
100 | #/*##########################################################################
# Copyright (C) 2004-2014 V.A. Sole, European Synchrotron Radiation Facility
#
# This file is part of the PyMca X-ray Fluorescence Toolkit developed at
# the ESRF by the Software group.
#
# Permission is hereby granted, free of charge, to any... | null |
101 | ################################################################################
# Creme is a free/open-source Customer Relationship Management software
# Copyright (C) 2009-2023 Hybird
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General P... | null |
102 | #!/usr/bin/env python
# CCP4InterRadiationDamageDetector.py
# Copyright (C) 2006 CCLRC, Graeme Winter
#
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.
#
# 15th January 2007
#
# A detector for radiation damage between wavelengths - in particul... | null |
103 | import pytest
from pybind11_tests import ConstructorStats
from pybind11_tests import operators as m
def test_operator_overloading():
v1 = m.Vector2(1, 2)
v2 = m.Vector(3, -1)
v3 = m.Vector2(1, 2) # Same value as v1, but different instance.
assert v1 is not v3
assert str(v1) == "[1.000000, 2.000... | null |
104 | #!/usr/bin/env python3
import argparse
import logging
import os
import re
import sys
# logging.basicConfig(level="INFO")
_logger = logging.getLogger(__name__)
def METHOD_NAME():
desc = """Process C/C++ files for '#if 0' and '#if 1' blocks"""
epilog = """This tool is for removing dead code from C/C++ files.... | null |
105 | import argparse
import json
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
def init_flags():
global FLAGS
parser = argparse.ArgumentParser()
parser.add_argument(
"--datadir",
default="/tmp/MNIST_data",
)
parser.add_argument("--rundir", default=... | null |
106 | # 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 |
107 | ################################################################################
# Creme is a free/open-source Customer Relationship Management software
# Copyright (C) 2009-2023 Hybird
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General P... | null |
108 | """Tests for anomaly detection with OTX CLI."""
# Copyright (C) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unle... | null |
109 | from __future__ import annotations
import os
import subprocess
import sys
import time
import fsspec
import pytest
from fsspec.core import open_files
from packaging.version import parse as parse_version
import dask.bag as db
from dask.utils import tmpdir
files = ["a", "b"]
requests = pytest.importorskip("requests")
... | null |
110 | # 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 |
111 | # 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 |
112 | # 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 |
113 | # 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 |
114 | # 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 |
115 | #!/usr/bin/env python3
# SPDX-FileCopyrightText: 2009 Fermi Research Alliance, LLC
# SPDX-License-Identifier: Apache-2.0
"""
Project:
glideinWMS
Description:
unit tests for glideinwms/lib/condorExe.py
Author:
tiradani <tiradani>
"""
import os
import sys
import unittest
import xmlrunner
from glideinwm... | null |
116 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import copy
from typing import Iterator
import torch
from torch import Tensor, autograd, nn
from torch.nn.modules.loss import _Loss
from torch.optim.optimizer import Optimizer
from archai.common import ml_utils
from archai.common.config import ... | null |
117 | # 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 |
118 | import warnings
from dataclasses import asdict, dataclass
from typing import Any, Dict, List, Optional, Sequence, Union
import numpy as np
from lhotse.features.base import FeatureExtractor, register_extractor
from lhotse.utils import Seconds, compute_num_frames, is_module_available
@dataclass
class OpenSmileConfig:... | null |
119 | # 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 |
120 | # 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 |
121 | # 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 |
122 | #!/usr/bin/env python3
###############################################################################
# Copyright 2020 The Apollo 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... | null |
123 | """
This module defines options which should be available on all commands, such as the
-v, --verbose option.
To use it:
- Add the `@add_common_options()` decorator after all the `click.option()` calls of the
command function.
- Add a `**kwargs: Any` argument to the command function.
The `kwargs` argument is require... | null |
124 | # 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 |
125 | # OPENCORE - ADD
from shared.database.task.job.job import Job
from shared.database.project import Project
from shared.regular import regular_log
from shared.shared_logger import get_shared_logger
from shared.feature_flags.feature_checker import FeatureChecker
from shared.settings import settings
from shared.database.so... | null |
126 | # Copyright 2020 The Johns Hopkins University Applied Physics Laboratory
#
# 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 ... | null |
127 | import aiohttp
import asyncio
import logging
import time
import ujson
from typing import (
Any,
Dict,
Optional,
)
from hummingbot.connector.exchange.ndax.ndax_auth import NdaxAuth
from hummingbot.connector.exchange.ndax import ndax_constants as CONSTANTS, ndax_utils
from hummingbot.connector.exchange.ndax... | null |
128 | import sys
from json import loads
from typing import Iterator
from galaxy.datatypes.tabular import Tabular
from galaxy.model import DatasetInstance
class BaseDataProvider:
"""
Base class for data providers. Data providers both:
- read and package data from datasets
- write subsets of data to new dat... | null |
129 | #!/usr/bin/env python3
import cv2
import numpy as np
import depthai as dai
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-res", "--resolution", type=str, default="720",
help="Sets the resolution on mono cameras. Options: 800 | 720 | 400")
parser.add_argument("-md", "--mesh_dir", type=str... | null |
130 | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with self work for additional information
# regarding copyright ownership. The ASF licenses self file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | null |
131 | #
# 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 |
132 | import pytest
from api.base.settings.defaults import API_BASE
from osf.migrations import ensure_invisible_and_inactive_schema
from osf.models import RegistrationSchema
from osf_tests.factories import (
AuthUserFactory,
)
pytestmark = pytest.mark.django_db
SCHEMA_VERSION = 2
@pytest.fixture()
def user():
re... | null |
133 | # Copyright (c) ZenML GmbH 2021. 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 |
134 | # 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 |
135 | import os, json
from opendm import log
from opendm.pseudogeo import get_pseudogeo_utm, get_pseudogeo_scale
from opendm.location import transformer
from pyproj import CRS
from osgeo import gdal
import numpy as np
import cv2
def get_rotation_matrix(rotation):
"""Get rotation as a 3x3 matrix."""
return cv2.Rodrig... | null |
136 | # Copyright (C) 2012 Anaconda, Inc
# SPDX-License-Identifier: BSD-3-Clause
from logging import getLogger
from conda.common.path import (
get_major_minor_version,
missing_pyc_files,
url_to_path,
win_path_backout,
)
log = getLogger(__name__)
def METHOD_NAME():
assert url_to_path("file:///etc/fstab... | null |
137 | import pytest
from eth_utils.toolz import (
compose,
curry,
)
from hexbytes import (
HexBytes,
)
AMBIGUOUS_CONTRACT_ABI = [
{
"constant": False,
"inputs": [{"name": "input", "type": "uint256"}],
"name": "blockHashAmphithyronVersify",
"outputs": [{"name": "", "type": "ui... | null |
138 | '''
These functions are rather specific to Amod's deeplearning code
and should probably be either moved or completely deleted. It might
make sense to develop some more universal normalization utility functions.
'''
import numpy as np
def piecewise_linear_normalize(in_img_data, ref_img_data):
'''Function to piece... | null |
139 | # 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 |
140 | # 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 |
141 | # 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 |
142 | #
# 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... | null |
143 | # -*- coding: utf-8 -*-
from __future__ import print_function
from acq4.util import Qt
import os
import acq4.util.database as database
import acq4.Manager
import acq4.analysis.modules as analysis
import acq4.analysis.AnalysisHost as AnalysisHost
import acq4.analysis.dataModels as models
from pyqtgraph import FileDialo... | null |
144 | # 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 |
145 | # 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_allof_with_base_schema_request_body.post import... | null |
146 | # -*- coding: utf-8 -*-
import re
import hmac
import hashlib
import logging
from django.apps import apps
from nameparser import HumanName
from werkzeug.utils import cached_property
from framework.flask import request
from website import settings
from website.conferences.exceptions import ConferenceError
logger = ... | null |
147 | # Copyright 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
#
# Unless requi... | null |
148 | # 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 |
149 | # 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 |
150 | # 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 |
151 | """ handle reading a csv from an external service, defaults are from Goodreads """
import csv
from datetime import timedelta
from typing import Iterable, Optional
from django.utils import timezone
from bookwyrm.models import ImportJob, ImportItem, SiteSettings, User
class Importer:
"""Generic class for csv data ... | null |
152 | import shutil
import warnings
from contextlib import contextmanager
from pathlib import Path
import pytest
from pharmpy.internals.fs.cwd import chdir
from pharmpy.model import Model
from pharmpy.tools import run_amd
from pharmpy.workflows import default_tool_database
def test_invalid_search_space_raises(tmp_path, t... | null |
153 | # 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 |
154 | """
DataProvider related decorators.
"""
# I'd like to decorate the factory methods that give data_providers by the name they can be accessed from. e.g.:
# @provides( 'id_seq' ) # where 'id_seq' is some 'data_format' string/alias
# def get_id_seq_provider( dataset, **settings ):
# then in some central dispatch (maybe... | null |
155 | import IMP
import IMP.test
import IMP.algebra
from io import BytesIO
import pickle
class Tests(IMP.test.TestCase):
def test_trivial_constructor(self):
"""Test trivial SpherePatch3D constructor"""
p = IMP.algebra.SpherePatch3D()
def METHOD_NAME(self):
"""Check that a patch of a sphere... | null |
156 | # 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 |
157 | # 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 |
158 | import logging
import re
from galaxy.datatypes.data import (
get_file_peek,
Text,
)
from galaxy.datatypes.metadata import MetadataElement
from galaxy.datatypes.protocols import DatasetProtocol
from galaxy.datatypes.sniff import (
build_sniff_from_prefix,
FilePrefix,
get_headers,
)
from galaxy.datat... | null |
159 | # 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 |
160 | #!/usr/bin/python3 -u
# Copyright 2021 Memgraph Ltd.
#
# Use of this software is governed by the Business Source License
# included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
# License, and you may not use this file except in compliance with the Business... | null |
161 | # 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 |
162 | from typing import Type
from collections import OrderedDict
from AnyQt.QtWidgets import QLineEdit, QSizePolicy
from Orange.data import Table
from Orange.data.sql.backend import Backend
from Orange.data.sql.backend.base import BackendError
from Orange.widgets import gui, report
from Orange.widgets.credentials import C... | null |
163 | # 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 |
164 | from functools import partial
from urllib.parse import unquote, urlparse
from django.conf import settings
from django.urls import reverse
from creme.creme_core.models import FakeContact, FakeOrganisation, FieldsConfig
from creme.creme_core.tests.views.base import ViewsTestCase
class SearchAndViewTestCase(ViewsTestC... | null |
165 | # 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 |
166 | # 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 |
167 | #!/usr/bin/python3
#
# Bluetooth conenection agent (C) 2019 @kaymes
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will b... | null |
168 | # 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 |
169 | # 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 |
170 | # 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 |
171 | #!/usr/bin/env python
import argparse
import pathlib
import re
import requests
import toml
HERE = pathlib.Path(__file__).resolve().parent
ROOT = HERE.parent
FALCON_CREATOR = 'kgriffs'
FALCON_REPOSITORY_API = 'https://api.github.com/repos/falconry/falcon'
STABLE_RELEASE_TAG = r'^\d+\.\d+\.\d+(\.post\d+)?$'
AUTHORS... | null |
172 | import os.path
from unittest import TestCase
from pcs import settings
from pcs.common.reports import codes as report_codes
from pcs.lib.commands import cluster
from pcs_test.tools import fixture
from pcs_test.tools.command_env import get_env_tools
class SuccessMinimal(TestCase):
def setUp(self):
self.en... | null |
173 | # 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 |
174 | # Copyright (c) 2015 - 2023, Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
#
import sys
PYTHON_PATHS = [
"/usr/lib/python3.6/site-packages",
"/usr/lib64/python3.6/site-packages"]
for p in PYTHON_PATHS:
if p not in sys.path:
sys.path.insert(0, p)
import os
import json
impor... | null |
175 | import time
def _wait_and_get_responses(job_ids, batch_client):
"""Waits on all given jobs to terminate; returns the job descriptions."""
job_responses = {}
for job in job_ids:
terminated = False
while not terminated:
response = batch_client.describe_jobs(jobs=[job])
... | null |
176 | # Copyright 2017-2019 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 |
177 | # 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 |
178 | """Collection of compose pipelines for segmentation task."""
# Copyright (C) 2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
from collections.abc import Sequence
from copy import deepcopy
import numpy as np
from mmcv.utils import build_from_cfg
from mmseg.datasets.builder import PIPELINES
from scipy.n... | null |
179 | # 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 |
180 | # 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 |
181 | from __future__ import annotations
import logging
import os
from xia2.Decorators.DecoratorFactory import DecoratorFactory
from xia2.Driver.DriverFactory import DriverFactory
from xia2.Handlers.Phil import PhilIndex
from xia2.lib.bits import transpose_loggraph
from xia2.Wrappers.CCP4.Ctruncate import Ctruncate
from xi... | null |
182 | #!/usr/bin/env python3
# Copyright (c) 2016-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test Wallet encryption"""
import time
from test_framework.test_framework import BitcoinTestFramework
... | null |
183 | """
Author : Dhruv B Kakadiya
"""
import pygame as pg
from .statics import *
from .pieces import *
# checker board creation
class checker_board:
def __init__(self):
self.board = []
self.selected = None
self.black_l = self.white_l = 12
self.black_k = self.white_k = 0
self.M... | null |
184 | # GemRB - Infinity Engine Emulator
# Copyright (C) 2003 The GemRB Project
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later versi... | null |
185 | import unittest
from decimal import Decimal
from pathlib import Path
from typing import Dict
from unittest.mock import patch
import yaml
from hummingbot.client.config.config_helpers import ClientConfigAdapter
from hummingbot.client.config.config_var import ConfigVar
from hummingbot.client.settings import ConnectorSet... | null |
186 | #!/usr/bin/env conda-execute
# conda execute
# env:
# - python
# - click
# - jinja2
# - requests
# - ruamel.yaml
# - conda-smithy
# - pygithub
# - fuzzywuzzy
# channels:
# - conda-forge
# run_with: python
import click
import conda_smithy.feedstocks as feedstocks
import jinja2
import json
import requests
impo... | null |
187 | import gradio as gr
import numpy as np
import os
import sentencepiece as spm
import time
import ctranslate2
from onmt.utils.logging import init_logger
from onmt.translate.translator import build_translator
from onmt.inputters.text_utils import textbatch_to_tensor
from onmt.inputters.inputter import IterOnDevice
from ... | null |
188 | # pylint: disable=redefined-outer-name
# -*- coding: utf-8 -*-
#
# This file is part of INGInious. See the LICENSE and the COPYRIGHTS files for
# more information about the licensing of this file.
import pytest
import os
import tempfile
import shutil
import copy
from inginious.common.base import directory_compare_fr... | null |
189 | import pytest
from conftest import SYSTEM_RELEASE_ENV
from envparse import env
def assign_packages(packages=None):
# If nothing was passed down to packages, set it to an empty list
if not packages:
packages = []
ol_7_pkgs = ["oracle-release-el7", "usermode", "rhn-setup", "oracle-logos"]
ol_8... | null |
190 | # -*- coding: utf-8 -*-
from __future__ import division, absolute_import, print_function, unicode_literals
#################################################################################################
import time
from datetime import datetime
from ..helper import LazyLogger
#####################################... | null |
191 | import pytest
from api_tests.utils import UserRoles
from osf_tests.factories import AuthUserFactory
from osf_tests.factories import NodeFactory, CollectionFactory, CollectionProviderFactory
from osf.migrations import update_provider_auth_groups
from osf.models import CollectionSubmission
from osf.utils.workflows impor... | null |
192 | import sys
import types
import py
from py.builtin import set, frozenset
def test_enumerate():
l = [0,1,2]
for i,x in enumerate(l):
assert i == x
def test_any():
assert not py.builtin.any([0,False, None])
assert py.builtin.any([0,False, None,1])
def test_all():
assert not py.builtin.all([T... | null |
193 | from django.urls import reverse
from .base import AuthenticatedAPITestCase
from pydis_site.apps.api.models import DocumentationLink
class UnauthedDocumentationLinkAPITests(AuthenticatedAPITestCase):
def setUp(self):
super().setUp()
self.client.force_authenticate(user=None)
def test_detail_lo... | null |
194 | # 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 |
195 | from django.contrib.contenttypes.models import ContentType
from django.utils.translation import gettext as _
from creme.creme_core.core.deletion import (
REPLACERS_MAP,
FixedValueReplacer,
SETReplacer,
)
from creme.creme_core.models import (
FakeCivility,
FakeContact,
FakeDocument,
FakeDocu... | null |
196 | import shutil
import os
import stat
import bpy
import arm.utils
from arm import log
if arm.is_reload(__name__):
log = arm.reload_module(log)
arm.utils = arm.reload_module(arm.utils)
else:
arm.enable_reload(__name__)
assets = []
reserved_names = ['return.']
khafile_params = []
khafile_defs = []
khafile_def... | null |
197 | #!/usr/bin/env python3
#
# Copyright (c) 2015 - 2023, Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
#
import os
import sys
import unittest
import subprocess
import io
import json
import geopmpy.agent
import geopmdpy.topo
from integration.test import geopm_test_launcher
from integration.test import util... | null |
198 | """Behavior (validation, encoding, and transformations) for vobjects."""
from .base import (
Component,
ContentLine,
NativeError,
ValidateError,
VObjectError,
defaultSerialize,
)
class Behavior:
"""Abstract class to describe vobject options, requirements and encodings.
Behaviors are ... | null |
199 | # coding: utf-8
"""
Lightly API
Lightly.ai enables you to do self-supervised learning in an easy and intuitive way. The lightly.ai OpenAPI spec defines how one can interact with our REST API to unleash the full potential of lightly.ai # noqa: E501
The version of the OpenAPI document: 1.0.0
Contact: ... | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.