sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
aabac85e5fb9cffa9e8cedaecdd1287d033f3cedc7c9a3be40ee544517724eb6 | Python | 196 | 9 | from setuptools import setup
setup(
name="CuneifyPlus",
version="1.0",
description="Wrapper around cuneify",
author="Thomas Gillam",
author_email="tpgillam@googlemail.com",
)
|
f72f84c87aaee1a42e0cf7dce5a40010b72ce96b12ea7614407ab2c7dd0171cb | Python | 196 | 8 | from .linear import Notears
from .low_rank import NotearsLowRank
from castle.backend import backend
if backend == 'pytorch':
from .torch import NotearsNonlinear
from .torch import GOLEM
|
6fda0357b0008e594ffaad8fe277b2734ebfbb2885596607d9b43136c45677d9 | Python | 198 | 9 | # roifile/__init__.py
from .roifile import *
from .roifile import __all__, __doc__, __version__
# constants are repeated for documentation
__version__ = __version__
"""Roifile version string."""
|
908dd8682250c89eab7676338aef20e06df586acf801d289d97794ea1f8ae875 | Python | 198 | 9 | """Dummy classifiers catalogue."""
from sktime.catalogues.classification.dummy._dummy_classification import (
DummyClassificationCatalogue,
)
__all__ = [
"DummyClassificationCatalogue",
]
|
0946491fe8b05728fe2c81f53de5d9b4ae97c95ae404730ac24fb0a9398bc6f4 | Python | 199 | 6 | import json
file_path = '../data/SQA0000254_Shrimp_positive_BAS_0_0_0_0_prawn_scaffold867_4182503_+_Cas9_SQA0000254_1.json_1'
with open(file_path) as file:
content = json.load(file)
a=0 |
1749a65cbec42ecdebc7d64810244d473216996da34aa44cb34d73c0463a0de6 | Python | 199 | 4 | {'config-search-paths': ['{:user-config-path}/neurondm/config.yaml',],
'auth-variables':
{'neurons-branch': {'environment-variables': 'NEURONS_BRANCH',
'default': 'neurons'}}}
|
81e2d63c985e19b8f1ace869cc69230b533192a3772843b434716f4b3e3bfb88 | Python | 199 | 5 | """Type checkers, converters and mtype inference for probabilistic return types."""
from sktime.datatypes._proba._convert import convert_dict as convert_dict_Proba
__all__ = ["convert_dict_Proba"]
|
eca0c8b99bab41f77863e7ac18b7057e648bb72e77cee80ab9fad39776fc85d4 | Python | 199 | 5 | # Copyright (c) OpenMMLab. All rights reserved.
from .collect_env import collect_env
from .logger import get_root_logger, load_json_log
__all__ = ['collect_env', 'get_root_logger', 'load_json_log']
|
f6c33a42ee81c8d3a442ae23402e1673db7853994d85c4c6c1a6e8755d619934 | Python | 201 | 8 | """Time series clustering module."""
__all__ = [
"BaseClusterer",
]
from sktime.clustering.agglomerative import TimeSeriesAgglomerativeClustering
from sktime.clustering.base import BaseClusterer
|
c9dc951e027ab57ef42603da6100c7d4df43e4e1408ae4b1356b2a84c2cb2835 | Python | 202 | 8 | # Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
__all__ = ["load_op"]
from onnx.reference.ops.experimental._op_list import load_op
|
3592d8c22eba998b7ad43e1fb23b34206b9043ba1d6790668089caaf6502c2fe | Python | 203 | 8 | # Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
__all__ = ["load_op"]
from onnx.reference.ops.aionnx_preview._op_list import load_op
|
e21993d76bceabb39215eb312efc129a84579f9bf2334ac726188dfe05bd5d48 | Python | 203 | 6 | """Module for general partitioning algorithms."""
from sktime.clustering.partitioning._lloyds import BaseTimeSeriesLloyds
__all__ = ["BaseTimeSeriesLloyds"]
__author__ = ["chrisholder", "TonyBagnall"]
|
6fa930085cba3f2a5c80e64997aea3f63f4f807906ba5d47361ab50f90508d6c | Python | 204 | 7 | import pickle
def loadStatistics(pickledDir, classifierID):
f = open(pickledDir + '/test_result.' + classifierID + '.pkl', 'rb')
test_result = pickle.load(f)
f.close()
return test_result
|
9e37fa56d70c40793cdc8776ad3f335e5fc1733e1c04fc4cfe6706e216349c01 | Python | 204 | 6 | from torchvision.models.resnet import ResNet, Bottleneck
class ResNet152ImageClassifier(ResNet):
def __init__(self):
super(ResNet152ImageClassifier, self).__init__(Bottleneck, [3, 8, 36, 3]) |
b95944422533d37b8cd81de781a6247ac790be5d7975a0889942f8213d1b3406 | Python | 204 | 5 | # Copyright (c) OpenMMLab. All rights reserved.
from .dist_utils import DistOptimizerHook, allreduce_grads
from .misc import multi_apply
__all__ = ['allreduce_grads', 'DistOptimizerHook', 'multi_apply']
|
60e67559c9fa6b5e61c4a2bbd4793666938f2e3e93961084b89d50de8b14cb27 | Python | 205 | 10 | from setuptools import find_packages, setup
setup(
name='src',
packages=find_packages(),
version='0.1.0',
description='digital confocal microscopy',
author='Rui',
license='MIT',
)
|
5a6e6fb8e3d8215ab0717183fccaaeb5469f0758354015989298764c8b5732bd | Python | 206 | 9 | from setuptools import setup, find_packages
setup(
name='parse_mito_blast',
version='1.0',
author='vgp-assembly',
author_email='vgl-bfx@mail.rockefeller.edu',
packages=find_packages()
) |
f786b3e401efedbf72ece44a501374219768f2471dddf224368ef4fbce16b30d | Python | 206 | 11 |
import os
import ts
def test_ts_version():
with open(os.path.join("ts", "version.py")) as f:
exec(f.read(), globals())
assert __version__ == str(ts.__version__), "Versions don't match"
|
c57ad5fbf572cc879973c9d74e6b3099797853f115f42cc24227fef4e0bf91ad | Python | 207 | 8 | # SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
import numpy as np
def abs(input: np.ndarray) -> np.ndarray: # noqa: A001
return np.abs(input) # type: ignore[no-any-return]
|
376457b13b6101ecc25cbd385e73831c6bb641c7a3c3f0eec8719e4a6969fa1e | Python | 208 | 11 |
"""
This is a folder for all python worker metrics.
"""
from . import dimension
from . import metric
from . import metric_encoder
from . import metrics_store
from . import system_metrics
from . import unit
|
41be3e92429ca9b2ab8a294aa81e0697eaf8ba9fa604012f4b43de1a4aa7ba27 | Python | 209 | 5 | """A place for misc/incomplete developer code.
This is not an official sktime package. The contents stored here are not guaranteed to
be properly reviewed, and can change at any time with no deprecation.
"""
|
e01ece371cba837c25719b45252ea1b99067309b282906fd1af0ab2f8a4329ec | Python | 209 | 4 | from lgn.models.autotest.lgn_tests import lgn_tests
from lgn.models.autotest.lgn_tests import covariance_test
# from lgn.models.autotest.utils import get_internal_dev_stats, get_output, get_dev, plot_all_dev
|
583066a6a022608003fba57148dfda191ef5193d6aa8abf296ae6de470e2ec9b | Python | 210 | 10 | import sys
import os
def init(cfg, args):
import ete3
ncbi = ete3.NCBITaxa()
ncbi.update_taxonomy_database()
print('NCBI Taxomomy database is installed in {}.'.format(ncbi.dbfile))
|
e6174bfd1dedeb4009696cc1f3360c3f8619d7dd330fee0f738eebae61f4e253 | Python | 210 | 9 | '''
Pure-python implementation of UCSC "liftover" genome coordinate conversion.
Test module. Meant for use with py.test.
Copyright 2013, Konstantin Tretyakov.
http://kt.era.ee/
Licensed under MIT license.
''' |
c63e1c0eaa9a897bf632f391277f6c1f8f903a395287f62ed34a24e31b232e8a | Python | 212 | 12 |
"""
Model Archiver Error
"""
class ModelArchiverError(Exception):
"""
Error for Model Archiver module
"""
def __init__(self, message):
super(ModelArchiverError, self).__init__(message)
|
606a7f5e9ab03885330d348583017708c20b6c81e6d883a95307d22074418891 | Python | 214 | 11 | #!/usr/bin/env python
__doc__ = """
Augmentor - Flip and Rotate Only
"""
from augmentor import *
def get_augmentation(is_train, **kwargs):
augs = list()
augs.append(FlipRotate())
return Compose(augs)
|
b022f424550584ab1d9ea129046ceaa428cef7a84f539eb9f4e2a673f496df38 | Python | 216 | 7 | from expert.src.proportions import Proportions
def format(cfg, args):
prop = Proportions(read_from=args.input)
krona_format = prop.krona_format()
prop.export_krona(krona_format, output_dir=args.output)
|
8cf7d771706389aa82f3bc83ddb5331012956e2427e39dad954cc596108b9a7c | Python | 217 | 7 | from torchvision.models.vgg import VGG, make_layers, cfgs
class ImageClassifier(VGG):
def __init__(self):
super(ImageClassifier, self).__init__(make_layers(cfgs['A'], False), **{'init_weights': False})
|
a0da6426316ce0d7caf61af601acf467f2dce617a7da07efad42896e1c3ab825 | Python | 218 | 8 | # Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
__all__ = ["ReferenceEvaluator"]
from onnx.reference.reference_evaluator import ReferenceEvaluator
|
127cb19465317dcf98d9e6b55fb311632aafa7aed970c8ec1a66334b4476162a | Python | 219 | 6 | import pkgutil
from pathlib import Path
# __path__ fails in nosetests for reasons I do not understand
thispath = [Path(__file__).parent.as_posix()]
__all__ = [mod for _, mod, is_pkg in pkgutil.walk_packages(thispath)]
|
46ea6d0e6c2f89e4c2f2cd1bc0633ac284087cac1452cdc5e3de0164489b29d1 | Python | 220 | 14 | import numpy as np
import matplotlib.pyplot as plt
import pytest
@pytest.fixture(autouse=True)
def close_figs():
yield
plt.close("all")
@pytest.fixture(autouse=True)
def random_seed():
np.random.seed(47)
|
586250b8baff7b5a137dd70d4cdef62c72b378530a16253d60da7560197758f2 | Python | 220 | 9 | """Hybrid time series classifiers."""
__all__ = [
"HIVECOTEV1",
"HIVECOTEV2",
]
from sktime.classification.hybrid._hivecote_v1 import HIVECOTEV1
from sktime.classification.hybrid._hivecote_v2 import HIVECOTEV2
|
98daad25878f53593526cd3d1d72d1a9729bddd60b228cfae8ecfdc52a6d1f11 | Python | 220 | 9 | """Shared type aliases for the imaging subpackage."""
import os
from typing import Union
import nibabel as nib
# Anything that ``io.load_nifti`` can accept.
NiftiLike = Union[str, bytes, os.PathLike, nib.Nifti1Image]
|
062b5a333e5e0e5c38ea2b02261f3005b901cfc11b145dd557d06d3333ca7e67 | Python | 222 | 8 | """Time series averaging metrics."""
__all__ = ["dba", "mean_average", "_resolve_average_callable"]
from sktime.clustering.metrics.averaging._averaging import (
_resolve_average_callable,
dba,
mean_average,
)
|
6ed4ddef5d8dd69a4804267d744f92bef3b0260b9254f45a50c2124ab4134d19 | Python | 222 | 5 | """Plotting."""
from .burst import plot_burst_detect_summary, plot_burst_detect_param
from .cyclepoints import plot_cyclepoints_df, plot_cyclepoints_array
from .features import plot_feature_hist, plot_feature_categorical
|
1c43a82c8474fdd3c67e6f610c251f87c7b446dd8eaaad011e3aae1da2ce1801 | Python | 223 | 10 |
"""
Model services code
"""
import warnings
from . import model_service
warnings.warn("Module ts.model_service is deprecated, please migrate to model archive 1.0 format.",
DeprecationWarning, stacklevel=2)
|
7a015dcf15ff36795a5458a253d4b642a9d4e6e35d3fd46a03185da1b54d334d | Python | 223 | 10 | # Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
from onnx.reference.op_run import OpRun
class OpRunExperimental(OpRun):
op_domain = "experimental"
|
dc44e5294bf3c7bf6a74a5279ecb91f5c2c14f2673dcc581e8e252fc19160f8f | Python | 223 | 9 | from atom3d.datasets import load_dataset, make_lmdb_dataset
import sys
in_path = sys.argv[1]
out_path = sys.argv[2]
dataset = load_dataset(in_path, 'lmdb')
make_lmdb_dataset(dataset, out_path, filter_fn=lambda x: not x)
|
bf80709a3480cf23c8a95e2b67d4430071edeafe9d87a10263ae6fc209359181 | Python | 224 | 8 | from .anomaly_detection import *
from .jet_features import *
from .jet_images import *
from .jet_recon_err import *
from .particle_features import *
from .particle_recon_err import *
from .plot import *
from .utils import *
|
a07949532f7e353a47a5089679513b8ea70561b5ca52196dc2059c43abee6e47 | Python | 225 | 5 | """
EvoAug is a PyTorch package to pretrain sequence-based deep learning models for
regulatory genomics data with evolution-inspired data augmentations followed by a
finetuning on the original, unperturbed sequence data.
"""
|
bbfd8dc39938ae9b938dd9080abfea37dff4ce9eb9be51f550626fa8feb5a49d | Python | 225 | 12 | """
AQDnet CLI: Command-line interface for feature extraction, training, and prediction
"""
__version__ = "0.1.0"
__author__ = "AQDnet Authors"
def main():
from .__main__ import main as cli_main
return cli_main()
|
ebe8bcad48e555a16a7516b0cb2821f22a32bc4dd9949b408aa3ccf7cbc0d730 | Python | 225 | 7 | from ._version import __version__
# from paradime.dr import ParametricDR, TrainingPhase, Dataset
# from paradime import loss
# from paradime import relations
# from paradime import transforms
# from paradime import routines
|
08765fed5e8365ec9051dd9d1ab3bafb31a362b9a8f844fb154587613c9f4ba6 | Python | 226 | 5 | from lgn.models.lgn_levels import LGNNodeLevel, CGMLP
from lgn.models.lgn_cg import LGNCG
from lgn.models.lgn_encoder import LGNEncoder
from lgn.models.lgn_decoder import LGNDecoder
from lgn.models.utils import adapt_var_list
|
c48061b0814e9aeec6de0f2f3da0fb91b3fca43df2dd6fbb87588ab3fadf64cc | Python | 226 | 8 | # Copyright (c) OpenMMLab. All rights reserved.
from mmcv.utils import Registry, build_from_cfg
AUGMENT = Registry('augment')
def build_augment(cfg, default_args=None):
return build_from_cfg(cfg, AUGMENT, default_args)
|
013f64e7a5f8505977c70081a5f447a9a850817c5e8d1245a6e0ad708d81baa5 | Python | 227 | 7 | """Module exports: Hierarchical type checkers, converters and mtype inference."""
from sktime.datatypes._hierarchical._convert import (
convert_dict as convert_dict_Hierarchical,
)
__all__ = ["convert_dict_Hierarchical"]
|
11a32cc9994a27db18b8198aad8aaf1a683eb27fb146d6916ba0d36cfd6fb3d8 | Python | 227 | 5 | # Copyright (c) OpenMMLab. All rights reserved.
from .decorators import auto_fp16, force_fp32
from .hooks import Fp16OptimizerHook, wrap_fp16_model
__all__ = ['auto_fp16', 'force_fp32', 'Fp16OptimizerHook', 'wrap_fp16_model']
|
4591a00fa2116a7d3827ef4f632a3f8d8b02d131fe2e0f1a133054880deb2504 | Python | 227 | 11 | """
ExplaiNN
interpretable and transparent neural networks for genomics
"""
from .utils import tools
from .interpretation import interpretation
from .train import train, test
from .models import networks
__version__ = "0.1.5" |
01c139853c27529966823bc473f6f80e2abbb32c26efbdd71aa0a78da5cda236 | Python | 229 | 5 | from .core.plot import svg_heatmap
from .core.plot import hotspot_distribution_map
from .core.plot import spot_type_map
from .core.plot import hotspot_expression, gene_expression
from .core.plot import hotspot_colocalization_map
|
24e5f5fc05dee38851696f68d25ad112c261d554ab55bd4daf98b4a14c085dd9 | Python | 229 | 10 | """sktime - the package for AI with time series.
See https://www.sktime.net/ for documentation and tutorials.
"""
__version__ = "1.2.0"
__all__ = ["show_versions"]
from sktime.utils._maint._show_versions import show_versions
|
40e7570ba9671016b7294a32b6ec17f6c67699ebeb07dd712a1a4748efe23a35 | Python | 230 | 10 | # Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
from onnx.reference.op_run import OpRun
class OpRunTraining(OpRun):
op_domain = "ai.onnx.preview.training"
|
07794f5dd0f6605428ec2de2d14037b0e139e43b88ef11f1b81f47c1961bb0d7 | Python | 232 | 8 | # Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
__all__ = ["BackendTest"]
# for backward compatibility
from onnx.backend.test.runner import Runner as BackendTest
|
de17c2c623ef50eb6d846921af4f94e9a82c00bb19ec50ec029395f926a6ce3d | Python | 233 | 9 | """
@file: ${NAME}
Created on ${DATE}
@project: ${PROJECT_NAME}
@author: ${USER}
Please describe what the content of this file is about
Put this text in Settings->Settings->File and Code Templates->Python Script (using Pycharm)
"""
|
12d122cdd5a4d3dceeaaa0faa80b2d87149cf9bc70c39b745f5a4989713e602f | Python | 234 | 8 | """Module exports for dist_kernels.base module."""
from sktime.dists_kernels.base._base import (
BasePairwiseTransformer,
BasePairwiseTransformerPanel,
)
__all__ = ["BasePairwiseTransformer", "BasePairwiseTransformerPanel"]
|
07822ae8e9302fda7c26cc43c488d3906b4509ab13d486eec9fe3407b9bd3a0c | Python | 236 | 16 |
import sys
fi=open(sys.argv[1])
fo=open(sys.argv[2],'w')
for line in fi:
seq=line.rstrip().split('\t')
seq[4]=str(int(seq[4])-1000)
seq[5]=str(int(seq[5])+1000)
fo.write('\t'.join(seq)+'\n')
fo.close()
fi.close()
|
71842dd158d6274d7ed1f9e3f5f593d9888d4ce613ad2ead94874f3fb0a2d2ea | Python | 237 | 7 | #!/usr/bin/env python3 -u
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)
"""Implements adapters for time series detection."""
__all__ = ["PyODDetector"]
from sktime.detection.adapters._pyod import PyODDetector
|
8e7c05af2edb0b9ccbc004bb7fdb16ecc04cfad6bc1e18f513baa954a470c526 | Python | 237 | 7 | """Tabby zero-shot anomaly detection adapters for the TSB-AD benchmark."""
from .detector import LATENT_METRICS, PatchTSTFM_AD
TabbyAnomalyDetector = PatchTSTFM_AD
__all__ = ["LATENT_METRICS", "PatchTSTFM_AD", "TabbyAnomalyDetector"]
|
e54f259bf62ecaad98230e0bad42e1582cb93d2ba86f3863db2c10d7d6ec2ea1 | Python | 237 | 4 | from .batch_preprocessing import basic_preprocessing
from .batch_preprocessing import basic_preprocessing_with_pad
from .registration_parameters import get_registration_preset
from .registration_parameters import get_registration_presets |
1ce1078faadd10d507edcfa0e12c570c05fdb6a1464ab09f30f962e099861346 | Python | 240 | 9 | #!/usr/bin/env python3 -u
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)
"""Implements causal forecasters."""
__all__ = [
"DoubleMLForecaster",
]
from sktime.forecasting.causal._dmlf import DoubleMLForecaster
|
5280ade876e02752ce93c6ac3d7fd96dfd23fc0dbb296b7a4e3cde592310db27 | Python | 240 | 7 | # Copyright 2019-2021 The AmpliGraph Authors. All Rights Reserved.
#
# This file is Licensed under the Apache License, Version 2.0.
# A copy of the Licence is available in LICENCE, or at:
#
# http://www.apache.org/licenses/LICENSE-2.0
# |
745205b0c34d82517b26e17d9f25b60ec0f91e79ba705f92abc5c8f81980d019 | Python | 240 | 7 | # Copyright 2019-2026 The AmpliGraph Authors. All Rights Reserved.
#
# This file is Licensed under the Apache License, Version 2.0.
# A copy of the Licence is available in LICENCE, or at:
#
# http://www.apache.org/licenses/LICENSE-2.0
# |
e9b4a371c255464f66c14ca699a2d03f6d143373b6706f02f075644b44e0e615 | Python | 240 | 11 | # __init__
from __future__ import annotations
import jetnet.datasets
import jetnet.datasets.normalisations
import jetnet.datasets.utils
import jetnet.evaluation
import jetnet.losses
import jetnet.utils # noqa: F401
__version__ = "0.2.5"
|
0a59c30b443c03501a29af9ebae175569d01c0d4d08602c7eac611324cb073aa | Python | 241 | 12 | #!/usr/bin/python
#
# Morphology definitions for models.
#
# This file includes readers for
#
# Paul B. Manis, Ph.D. 2009 (August - November 2009)
#
from neuron import h
from .morphology import Morphology
from .hoc_reader import HocReader
|
a62fbc482844c321b3bbaa5e6196d8487a287660923ede2a193ec5c9bf822b1e | Python | 241 | 7 | # Copyright 2019-2026 The AmpliGraph Authors. All Rights Reserved.
#
# This file is Licensed under the Apache License, Version 2.0.
# A copy of the Licence is available in LICENCE, or at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
|
a8f255f1ef43e18996e2f29c197d792bfed88af5a0589745a517c3859c74276a | Python | 241 | 6 | # contains data about general status of PBT optimization
PBT_CSV = "pbt_state.csv"
# contains data about which models are exploited
EXPLOIT_CSV = "exploits.csv"
# contains data about which hyperparameters are used
HPS_CSV = "gen_config.csv"
|
555bb18b271cb3e39d34692c1a625c44aeeccf346902dd923812fb219b9dfd60 | Python | 242 | 8 | # Copyright 2019-2026 The AmpliGraph Authors. All Rights Reserved.
#
# This file is Licensed under the Apache License, Version 2.0.
# A copy of the Licence is available in LICENCE, or at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
|
a8a9c7461d4fe7bd86d5a0bcca8dd881f00224a6a3063cd0b7e6991715c359a7 | Python | 244 | 10 | import qiime2.plugin.model as model
class MatchingFormat(model.TextFileFormat):
def validate(*args):
pass
MatchingDirectoryFormat = model.SingleFileDirectoryFormat(
'MatchingDirectoryFormat', 'matching.tsv', MatchingFormat)
|
dda553c907c94a9e8fa25d84618441c2509321c96af1fa940875491c86cfc8ba | Python | 245 | 11 | # Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
from onnx.reference.op_run import OpRun
class SequenceAt(OpRun):
def _run(self, seq, index):
return (seq[index],)
|
688a41955dbc564e270bff9b4aac5871cc8d7970e1e78a1fba4f8832340c07ff | Python | 246 | 7 | # -*- coding: utf-8 -*-
__author__ = """Adam Geitgey"""
__email__ = 'ageitgey@gmail.com'
__version__ = '1.4.0'
from .api import load_image_file, face_locations, batch_face_locations, face_landmarks, face_encodings, compare_faces, face_distance
|
d6b8fb94054807e673728ce0700218447219fbaba667741492aafe9d261584c3 | Python | 246 | 3 | from .registration import ANTSStage, ANTSParams, ANTSRegisteration
from .transformation import ANTSTransformationParams, ANTSTransformationStages, ANTSImageTransformation, ANTSPointTransformation
from .helper import define_initial_transformation
|
0d6fe3c625792dc4c0d57d0decc75ff08102dbd9b0898b9c4d025879dcad7a26 | Python | 247 | 11 | # Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
from onnx.reference.op_run import OpRun
class SequenceConstruct(OpRun):
def _run(self, *data):
return (list(data),)
|
ddf10d02c3a4b9c25c33570ec4a12df30443cf9626f9765d406ef2444934ac24 | Python | 247 | 6 | """Time series kmeans clustering module."""
__all__ = ["TimeSeriesKMeans", "TimeSeriesKMeansTslearn"]
from sktime.clustering.k_means._k_means import TimeSeriesKMeans
from sktime.clustering.k_means._k_means_tslearn import TimeSeriesKMeansTslearn
|
2aeff1c44dd0bdd49462516f5e090169c0684111bb61dad0ed53c378569c6689 | Python | 248 | 7 | from .image import (BaseFigureContextManager, ImshowInfosContextManager,
color_val_matplotlib, imshow_infos)
__all__ = [
'BaseFigureContextManager', 'ImshowInfosContextManager', 'imshow_infos',
'color_val_matplotlib'
]
|
e983d428a7c6743ccee97a8a142db672363f52d266d28837c92c4eff576f535d | Python | 248 | 7 | r"""
This package contains base classes for the other packages of this project.
"""
from .base_dataset import VPData, VPSubset, VPDataset
from .base_measure import VPMeasure
from .base_model import VPModel
from .base_model_block import VPModelBlock |
742ee231e2adddefc43892c96f5b09e90aeab9bbea227173f9abb429c5d4defd | Python | 250 | 10 | """Time series forecasting with ARIMA models."""
__all__ = [
"AutoARIMA",
"ARIMA",
"StatsModelsARIMA",
]
from sktime.forecasting.arima._pmdarima import ARIMA, AutoARIMA
from sktime.forecasting.arima._statsmodels import StatsModelsARIMA
|
7038eb88d5c80cc57e8650d890f81aefcf2070424599af10c09ace5d6b67dd57 | Python | 251 | 10 | from .stim import *
from .find_point import *
from .pynrnutilities import *
from .nrnutils import *
from .expfitting import *
from .user_tester import UserTester
from .get_anspikes import *
from .Params import *
from .talbotetalTicks import Extended
|
ff4587f7b357ff9e3d39be0992cbbd3c4bf2710a31b049652b743fb530f6a3b2 | Python | 252 | 6 | r"""
This package contains prediction models and model components related to the "Precipitation-Nowcasting" repository
at https://github.com/Hzzone/Precipitation-Nowcasting.
"""
from .ef_traj_gru import EF_TrajGRU
from .ef_conv_lstm import EF_ConvLSTM
|
3f5867806df986f8c197bdaea4a43bf1c7fd64a1b65436b984f61517ec2d869a | Python | 253 | 13 | import utils.dataset
import utils.feature_ensemble
import utils.feature_selection
import utils.snapshot_ensemble
import utils.solution
__all__ = [
'dataset',
'feature_ensemble',
'feature_selection',
'snapshot_ensemble',
'solution'
] |
58f479b3c0fcd5d77ff009fa8544bca779feeda003ccc237111ee91e7ee32e46 | Python | 253 | 7 | from .iv_curve import IVCurve
from .vc_curve import VCCurve
from .cc import CurrentClamp
from .synapse_test import SynapseTest
from .simple_synapse_test import SimpleSynapseTest
from .protocol import Protocol
from .population_test import PopulationTest
|
9ef9c7e6a78fcec78bc7f0855fa4f8b40665a2e0555ee9cbe05890210c027671 | Python | 254 | 11 | # Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
from onnx.reference.op_run import OpRun
class Sum(OpRun):
def _run(self, *args):
return (sum(args).astype(args[0].dtype),)
|
03f6bc73be0bb618f11b439be69c5f16a7a571d6123885e26a0fb67b81ab16b0 | Python | 256 | 10 | infer_config = {
'templates_file': '50k_training_templates',
'min_freq': 1,
'expt_name': 'depth0_dim300_lr1e3_stop2_fac30_pat1',
'hidden_size': 300,
'depth': 0,
'orig_fp_size': 1000000,
'final_fp_size': 32681,
'radius': 2,
} |
12235adfcccceb845a6c9a692eb82e3f256f9775fff2fa5bb09b370b90c1d993 | Python | 257 | 7 | #!/usr/bin/env python3 -u
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)
"""Implements functionality to evaluate forecasting models."""
__all__ = ["evaluate"]
from sktime.classification.model_evaluation._functions import evaluate
|
8aa2c74c5c4a656c6f404b0af3d5c39acdba14f7fb75dc1678ba91b431f24b12 | Python | 257 | 9 | """Prompt/post-training for the Tabby time-series foundation model."""
from .model import PatchTSTFMPromptCFG, PromptedPatchTSTFM, load_patchtstfm_backbone
__all__ = [
"PatchTSTFMPromptCFG",
"PromptedPatchTSTFM",
"load_patchtstfm_backbone",
]
|
f19f56a08c84044528910a14466e4db5006867c310529360598153da429fc915 | Python | 257 | 7 | # Copyright (c) OpenMMLab. All rights reserved.
from .augments import Augments
from .cutmix import BatchCutMixLayer
from .identity import Identity
from .mixup import BatchMixupLayer
__all__ = ('Augments', 'BatchCutMixLayer', 'Identity', 'BatchMixupLayer')
|
31e319d2baf866090af8cfb19cb99919b860870415a3480afa01b782535b9062 | Python | 258 | 9 | import warnings
from seaborn import * # noqa
reset_orig() # noqa
msg = (
"As seaborn no longer sets a default style on import, the seaborn.apionly "
"module is deprecated. It will be removed in a future version."
)
warnings.warn(msg, UserWarning)
|
daff3d5a38ffbb0d4413285fe28b3d2aeeadd82349682745f15ef666a15b618d | Python | 258 | 14 | from . import model
from . import preprocessing
from . import utils
from . import evaluator
from . import resources
from . import data_augmentation
from . import proportions
__all__ = [
"model",
"preprocessing",
"utils",
"proportions",
] |
de94aa659e91b97eec294d316392b417ab9127c6008420d3f9661b150d0eb9bd | Python | 259 | 8 | # Copyright (c) OpenMMLab. All rights reserved.
from functools import partial
def multi_apply(func, *args, **kwargs):
pfunc = partial(func, **kwargs) if kwargs else func
map_results = map(pfunc, *args)
return tuple(map(list, zip(*map_results)))
|
f910466ce3a6d3488c42d1df180f4974a7fc908b9ebb55c5263339e57769a4f6 | Python | 259 | 13 | #%%
import numpy as np
from joblib import Parallel, delayed
def random_function(rng):
return rng.integers(1000)
rngs = [np.random.default_rng(82), np.random.default_rng(83)]
par = Parallel(n_jobs=2)
par(delayed(random_function)(rng) for rng in rngs)
|
af5a0e059d11e975de2b633a71946718e76c08ded06dfd2d99d0016a61e3cf7d | Python | 260 | 9 | from .anomaly_detection import *
from .coordinate_transform import *
from .jet_features import *
from .jet_images import *
from .jet_recon_err import *
from .particle_features import *
from .particle_recon_err import *
from .plot import *
from .utils import *
|
ce8cc616ec60659f7d21cb625657bf4549d245d60494dac89bbb0ec7613c3ea2 | Python | 260 | 7 | from sweepstim import SweepStim, Stimulus, NaturalScenes, MovieStim
from behavior import Behavior, Foraging, VisualObject
from experiment import Experiment, Timetrials
from window import Window, Warp
from misc import ImageStimNumpyuByte
__version__ = "0.2.4"
|
3805d82664f56b5ac9296fff99f6d282835355bdf1d81b8374d759de63dcc2f6 | Python | 261 | 11 | import sys
fi=open(sys.argv[1])
fo=open(sys.argv[1]+'.longrange','w')
for line in fi:
seq=line.rstrip().split('\t')
this_out=seq[0]+'\t'+seq[1]+'\t'+seq[2]+'\t'+seq[3]+':'+seq[4]+'-'+seq[5]+','+seq[6]+'\n'
fo.write(this_out)
fi.close()
fo.close()
|
b083f64bee2c949448bf0abc316415b35d6d21f9925639b0f46770915731f425 | Python | 261 | 10 | import torch
import torch.nn.functional as F
def reconstruction_loss(x, x_hat):
return F.mse_loss(input=x_hat, target=x)
def kl_divergence(mu, logvar):
return torch.mean(-0.5 * torch.sum(1 + logvar - mu ** 2 - logvar.exp(), dim=1), dim=0)
|
c440a56eb9453d0529e92f51aece761344a906e88e8f78f51d13ede9f07c2241 | Python | 261 | 6 | # Copyright (c) OpenMMLab. All rights reserved.
from .evaluation import * # noqa: F401, F403
from .fp16 import * # noqa: F401, F403
from .hook import * # noqa: F401, F403
from .optimizers import * # noqa: F401, F403
from .utils import * # noqa: F401, F403
|
2093b682b5adcffb7d4894cddf16fc2f3767171f214645d782954d659d33cd4b | Python | 264 | 15 | import sys
fi=open(sys.argv[1])
fo=open(sys.argv[2],'w')
i=1
for line in fi:
seq=line.rstrip().split('\t')
this_id='ID'+str(i)+'E'
this_out=seq[0:3]+[this_id]+seq[3:]
out='\t'.join(this_out)+'\n'
fo.write(out)
i=i+1
fo.close()
fi.close()
|
9d6c3090dfff4839cd8a338d2f5c9a949ea8710903bfca470595c17627745dec | Python | 264 | 11 | from typing import List
def check_duplicate(list_of_str: List[str], fn=lambda a: a):
seen = set()
duplicate = set()
for item in list_of_str:
if fn(item) in seen:
duplicate.add(item)
seen.add(fn(item))
return duplicate
|
a7dbb5e7eb6b6073df92db12244c2515deedf7df1a71463465e9fc27838c609a | Python | 264 | 9 | """Module containing adapters to other forecasting framework packages."""
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)
__all__ = [
"HCrystalBallAdapter",
]
from sktime.forecasting.adapters._hcrystalball import HCrystalBallAdapter
|
19860630286620d9d9acc812d0c0cb162397a14371a58c30540eb04e15fd74ad | Python | 265 | 11 | from .augment import Augment, Compose, Blend
from .blur import *
from .box import *
from .flip import *
from .grayscale import *
from .label import Label
from .lost import *
from .misalign import *
from .missing import *
from .track import *
from .warp import Warp
|
3af3e6b49b67ba3928b80a6996ccb939b37e3c2d47aeba9c8c45c1b6842a9fee | Python | 265 | 13 | # Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
import numpy as np
from onnx.reference.ops._op import OpRunUnaryNum
class Tan(OpRunUnaryNum):
def _run(self, x):
return (np.tan(x),)
|
4c2ed8e6cbe3735a3086a16c04e78750294af9ce7904f87673b1f89b591e3dc0 | Python | 265 | 13 | # Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
import numpy as np
from onnx.reference.ops._op import OpRunUnaryNum
class Sin(OpRunUnaryNum):
def _run(self, x):
return (np.sin(x),)
|
af2cde03bfdd685083d436b259ad388be6d64deaa883dd3ec04d453a7667ee6c | Python | 265 | 13 | # Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
import numpy as np
from onnx.reference.ops._op import OpRunUnaryNum
class Cos(OpRunUnaryNum):
def _run(self, x):
return (np.cos(x),)
|
312a104fa54d6eef03d24bab23bf94808bcac837b12579e2905d4ecfc5a286cd | Python | 267 | 13 | # Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
import numpy as np
from onnx.reference.ops._op import OpRunUnaryNum
class Ceil(OpRunUnaryNum):
def _run(self, x):
return (np.ceil(x),)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.