sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
209b5a3dc3ddaf11f49019beafeac542c73ca72c86163c8ea06c49dad2acacb8 | Python | 157 | 5 | from .base import *
from .md17 import RevisedMD17
from .asedata import ASEData, ASEDBData
# from .ptdata import *
from .data_interface import LitAtomsDataset |
2d872915d037c95b00ca0fd5aba8d56839a79432771d23ccbef6a758e442518a | Python | 157 | 6 | """``python -m regtools.tissue_masking`` -> launch the GUI."""
from regtools.tissue_masking.launch import main
if __name__ == "__main__":
main()
|
d8e06534165d7924156b5e208c58aaad1c2504db1a92ee21992c9342b5041833 | Python | 157 | 8 | import torch.nn
from torch import Tensor
class Identity(torch.nn.Identity):
@staticmethod
def right_inverse(x: Tensor) -> Tensor:
return x
|
ddae3aa6813ea6fe9f2484fcab8b275d020db91283e6065e3b4582836fc0fac2 | Python | 157 | 7 | from elasticai.creator.vhdl.design.design import Design
class LayerNorm1d(Design):
def __init__(self) -> None:
super().__init__()
pass
|
47729410d874b7e075c68d79a23ab2c305d7192bf557f786fb22cc79fea8f5c1 | Python | 158 | 7 | # -*- coding: utf-8 -*-
"""Top-level package for TGAN."""
__author__ = """MIT Data To AI Lab"""
__email__ = 'dailabmit@gmail.com'
__version__ = '0.1.1-dev'
|
62fbd19697682c59399ca0618653c8ef9c79b2cb20450bb30eb7b83de11c6d28 | Python | 158 | 8 | """Init data"""
from __future__ import annotations
from importlib.metadata import version
# Load the version
__version__ = version("ts_workflow_examples")
|
6e483e552484bc81dfb7fcad70c68789407db58d5115179f0aceb4af9ec49475 | Python | 158 | 7 | """Q-Chem ASE calculator built around Custodian."""
from __future__ import annotations
from quacc.calculators.qchem.qchem import QChem
__all__ = ["QChem"]
|
ba3d939de6330252e89982c48b07fbc2c9164c8cfb45608efa32c66f8f0a1243 | Python | 158 | 7 | from .binary import *
from .select import *
from .string import *
from .fix import *
from .mapping import *
from .normalize import *
from .multilabel import * |
cc8432fb972b2399a87ae535b777fae659048eb1e804eefe265fbcf3c5049796 | Python | 158 | 7 | # -*- coding: utf-8 -*-
import sys
from niftymic.application.run_reconstruction_parameter_study import main
if __name__ == "__main__":
sys.exit(main())
|
d9b57d4940e928ffad38e10c3301e9b781b521c6cd24c650a1f0cd72e9bd723f | Python | 158 | 8 | """Init data"""
from __future__ import annotations
from importlib.metadata import version
# Load the version
__version__ = version("ts-workflow examples")
|
6c1f3fe2890996c859f7b63272961e56c90a22e3d2813779a1bf15d923e6cec0 | Python | 159 | 6 | """Allow running the module with ``python -m regtools.ng_viewer``."""
from regtools.ng_viewer.launch import main
if __name__ == "__main__":
main()
|
cd06f066bc13c6da464a310a61d4f7cb59389162f91b95903e0379030de8864c | Python | 159 | 11 | #!/usr/bin/env python
"""
MoCHI commandline tool
"""
import sys, os
from pymochi import main
if __name__ == "__main__":
main.main(demo_mode = True)
|
190537491dfba5af46cfda7c0a18638052281507f8e382e98c7b3966ed783f35 | Python | 160 | 6 | from schnarc import model
from schnarc import utils
from schnarc import data
from schnarc import nn
from schnarc import calculators
from schnarc import metrics
|
488705d7c33ac74c9660da9a899ab5255eab3ba4546c197fefedbaf199cd7d4e | Python | 160 | 6 | # -*- coding: utf-8 -*-
from .model import CRFDependencyModel
from .parser import CRFDependencyParser
__all__ = ['CRFDependencyModel', 'CRFDependencyParser']
|
99abd94d02092177dd7b011a4939fb116acd7cf656791a1f6feef8c6a5b97f63 | Python | 160 | 4 | # file generated by setuptools_scm
# don't change, don't track in version control
__version__ = version = '3.8.1'
__version_tuple__ = version_tuple = (3, 8, 1)
|
a9a37e7f0fe1b4880a5155e802e0045602b142eded67da84d9e88a916212ecb0 | Python | 160 | 4 | # file generated by setuptools_scm
# don't change, don't track in version control
__version__ = version = '2.6.2'
__version_tuple__ = version_tuple = (2, 6, 2)
|
0d0454f15d7a3ca5607c08f4198134f489fac4a3635c493796ee248b55bc2c1b | Python | 161 | 8 | from .cnn import *
from .ddpm import *
from .flow import *
from .gan import *
from .gnn import *
from .rnn import *
from .transformer import *
from .vae import * |
2f7ea3a1448d55fcada0daf5c7a74ad4c4b53c12493abc1896913d0d85f4103d | Python | 161 | 4 | from .adaptable_silu import AdaptableSiLU as AdaptableSiLU
from .sigmoid import Sigmoid as Sigmoid
from .silu import SiLU as SiLU
from .tanh import Tanh as Tanh
|
33b6e0a6970c31a4bc8523989e108bc3e29d8a40c4576625551bf541490d967e | Python | 161 | 5 | from .la import LALossTrainer
from .ldam import LDAMLossTrainer
from .eq import EQLossTrainer
from .focal import FocalLossTrainer
from .wce import WCELossTrainer |
43215af43b9adbfd71a5819a43d49b239953ec7f91fcd5aef9ddda5d49190b9b | Python | 161 | 7 | # -*- coding: utf-8 -*-
import sys
from niftymic.application.rsfmri_reconstruct_volume_from_slices import main
if __name__ == "__main__":
sys.exit(main())
|
58909e52ecaaef80289364de2bdf8e7b164ebbc5eb950cbbfb2d0112e58da2f4 | Python | 161 | 6 | from ._importlib import metadata
try:
__version__ = metadata.version('setuptools') or '0.dev0+unknown'
except Exception:
__version__ = '0.dev0+unknown'
|
afe751e910c9b0088095eeab012e7c8f5cd7361a4281c49dab283109061450c4 | Python | 161 | 4 | from cobolt.utils.dataset import MultiomicDataset
from cobolt.utils.data import SingleData, MultiData
__all__ = ['MultiomicDataset', 'SingleData', 'MultiData']
|
e6914756d737a2fb044bd21f529610ca96826cd7ca181aee34109bd6b79092ac | Python | 161 | 3 | """Schema IO sub-package: loaders and serializers for all HED schema file formats."""
from hed.schema.schema_io.df_util import save_dataframes, load_dataframes
|
16abc841471bf3e6bc7a9f5f01c99960e8900a3a6226451d11c61de7f86c34b0 | Python | 162 | 6 | import nibabel as nib
import numpy as np
imgdata = np.random.randn(64,64,32)
img = nib.Nifti1Image(imgdata, np.eye(4))
nib.save(img, '../testdata/test1.nii.gz')
|
1b86c1e499d6b73d7829c3e466a36e919b7c5444dedbeaca6e7e69cb605c52ab | Python | 162 | 11 |
import os
def makedir(path):
'''
if path does not exist in the file system, create it
'''
if not os.path.exists(path):
os.mkdir(path)
|
46705941b83ae827cbf63aea4d622fdb13908b52f2ca37f3fe445327857c1c72 | Python | 162 | 4 | """
Deprecated evolution.py module. This file only exists to support backwards-compatibility
with old pickle files. See bin/__init__.py for more information.
"""
|
b1539023a1f5c951bc9cfc7bc56cc3d9579bbc8c15e70f55ca6d4037e678d23a | Python | 162 | 8 | from .cnn import *
from .ddpm import *
from .flow import *
from .gan import *
from .gnn import *
from .rnn import *
from .transformer import *
from .vae import *
|
c42abe44ef997af1ef6e95c650a1998aa743192e3d258bbdd01b487b5a719af4 | Python | 162 | 6 | """Allow running with ``python -m regtools.updater``."""
from regtools.updater.launch import main
if __name__ == "__main__":
raise SystemExit(main())
|
c1618d2adda0d4b5af516273bf4ef4953f5f96278c229f6e2a5722a299234ac4 | Python | 163 | 6 | """``python -m regtools.cellpose_training`` -> launch the GUI."""
from regtools.cellpose_training.launch import main
if __name__ == "__main__":
main()
|
d42070ac493f761e6bae0ca60690fcd3c73b280ed0dc0343f3ffcddaf35353f2 | Python | 163 | 6 | from .classifier import *
from .regressor import *
from .domain_adaption import *
from .generative import *
from .self_supervised import *
from .imbalance import * |
07261a58737523f46824eb0d0497b97d9d6a889c70f4e4e99688db27f8adad7e | Python | 164 | 11 | from .model import SegmentationModel
from .modules import (
Conv2dReLU,
Attention,
)
from .heads import (
SegmentationHead,
ClassificationHead,
)
|
46512f5674a80316a12f4568f475369df55c061250308aa40ce9b22b7859569c | Python | 164 | 7 | """Miscellaneous utility functions."""
from __future__ import annotations
from quacc.atoms.core import check_charge_and_spin
__all__ = ["check_charge_and_spin"]
|
ba32f5010901cb530718670e7b31aa758b0007e675bb572500e3bad0d16f842d | Python | 164 | 6 | # -*- coding: utf-8 -*-
from .model import VIConstituencyModel
from .parser import VIConstituencyParser
__all__ = ['VIConstituencyModel', 'VIConstituencyParser']
|
c4b4c56f9d9c9fee6ae4dad63c14335879ba17a79c7b5182778a3001ecc5f1b4 | Python | 164 | 8 | from .train.train_scHetG import train_scHetG
from .train.utils import louvain, calculate_metric, calculate_ber
from .data.data_utils import preprocess
|
3c1520fa40a79227525d5756a80991eb6fa270cdefc56e348e87ada1d06c3996 | Python | 165 | 15 | import torch
from topaz.predict import batches, score, score_stream
def test_batches():
pass
def test_score_stream():
pass
def test_score():
pass |
2bc9cb45095698bc1082d3fbc8fe09054b419bf530f6c5287b13041a48aed655 | Python | 166 | 4 | """
Deprecated python_server.py module. This file only exists to support backwards-compatibility
with old pickle files. See bin/__init__.py for more information.
"""
|
3d5561d1b70210af33891b262a01f2209f22f5311129a1a8540dfaff996702bd | Python | 166 | 8 |
# built-in
from typing import Callable, Optional, TypeVar
T = TypeVar('T')
SimFunc = Optional[Callable[[T, T], float]]
TestFunc = Optional[Callable[[T, T], bool]]
|
465ac1740618d518a731db6ce2736e460f6215c6ecfbb9471aeb4d68d1b81d26 | Python | 166 | 2 | # from .evl_module import TransformerDecoder
from .clip_vit_only_global import vit_only_global_b32, vit_only_global_b16, vit_only_global_l14, vit_only_global_l14_336 |
1159f5d2e73e8c157233535b4bebc8e07e55f0f39b9130dfef777eebf886adf6 | Python | 167 | 9 | import logging
from . import models, reader, writer
logging.basicConfig(
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
level=logging.INFO
) |
3e00efd40fc45cdbe6a3a99aa3fd3b5aafd5bcf01fcedba5fdd7fd4038c0990b | Python | 168 | 3 | import numpy as np
tmp = np.load("/root/autodl-tmp/datasets/Algonauts_2023/features/videoMAEV2/vit_g_hybrid_pt_1200e_k710_ft_1048/sub01/0001_00.npy")
print(tmp.shape) |
6a341cc9c610f79ec258574099c0b29a53f6f86e698654489843247d3bfa1708 | Python | 168 | 6 | # -*- coding: utf-8 -*-
from .model import CRF2oDependencyModel
from .parser import CRF2oDependencyParser
__all__ = ['CRF2oDependencyModel', 'CRF2oDependencyParser']
|
b592954f18a6ed3dfcc7c7db9698e61a8bb362c08fcc3703ba698d4c9b33e046 | Python | 168 | 6 | # -*- coding: utf-8 -*-
from .model import CRFConstituencyModel
from .parser import CRFConstituencyParser
__all__ = ['CRFConstituencyModel', 'CRFConstituencyParser']
|
8b8904a9630054986ea3b344b86096d3b7855acb7c1c6dc61368efd362719251 | Python | 169 | 4 | """
Deprecated compressionGraph.py module. This file only exists to support backwards-compatibility
with old pickle files. See bin/__init__.py for more information.
"""
|
957db007bea8187821566a3dba2b281e32c073ce602ac7cd2bcf6606df96688d | Python | 169 | 14 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Jan 25 19:49:03 2020
@author: sayan
"""
def gpu(x):
x = x.to("cpu")
return(x)
|
ae522389450ff26bb27c6afe0657475169866e7ba080479d20932bd3ca6e16db | Python | 169 | 3 | from BEBE.visualization.time_series import plot_track
from BEBE.visualization.summaries import confusion_matrix
from BEBE.visualization.summaries import consistency_plot |
35d43fb2d7f362a25be6d7bbe618fee379db3ddbcd2693c83777603540be747f | Python | 170 | 11 |
@profile
def test_1(i):
# .. will be called twice ..
c = {}
for i in range(i):
c[i] = 2
if __name__ == '__main__':
test_1(10)
test_1(10000)
|
a9dfbeb6f0a24a8fd3c96f2728111198d9b8e80db848fadb63acdd4e74acc800 | Python | 170 | 2 | from .clocked_combinatorial import clocked_combinatorial as clocked_combinatorial
from .unclocked_combinatorial import unclocked_combinatorial as unclocked_combinatorial
|
031d5ae5a499f8696df99135a8bc85d22f95c3c02031d8766cafba1e46e7e45b | Python | 171 | 5 | class DLModelOutputs:
"""Class to represent model's outputs on a sliding window over a recording"""
def __init__(self, window_stride, num_channels):
pass
|
2988403f700ad8c9230d392ab42b7039aa791313b1e90b35471eebf27eeb1b98 | Python | 171 | 7 | from torch import Tensor
from .math_operations import MathOperations as _BinaryOperations
def quantize(x: Tensor) -> Tensor:
return _BinaryOperations().quantize(x)
|
768f59389a62271cc252661203b5583a6754c48892a738b237400c7c7a61460a | Python | 171 | 4 | """
Deprecated symbolicRegression.py module. This file only exists to support backwards-compatibility
with old pickle files. See bin/__init__.py for more information.
"""
|
c1d45981d0bed69bbff3df054654de253a6db80378b32ff872d5a2391ad89ce7 | Python | 171 | 3 | from .identity import BufferedIdentity as BufferedIdentity
from .identity import BufferlessIdentity as BufferlessIdentity
from .sequential import Sequential as Sequential
|
1eeacb133b570731fc2703ca250409647a44dd8ee33021043ebb5bef2bbb2cf4 | Python | 172 | 9 | import os
import sys
HERE = os.path.dirname(__file__)
if __name__ == "__main__":
import pytest
errcode = pytest.main([HERE] + sys.argv[1:])
sys.exit(errcode)
|
b780b91a9c97c590c5dfec3275a9f123117879cbe3155e2f5daef8f6c328ff5a | Python | 172 | 9 | """"""
class GPoolDummy:
""" Dummy for g_pool. """
def __init__(self, **kwargs):
for key, value in kwargs.items():
setattr(self, key, value)
|
107210cc048ffdc0395ef43c521ea019c222e4ec7205a67c7e58920e5d4d773e | Python | 173 | 7 | """Entry point: `python -m regtools.config_menu`."""
from regtools.config_menu.gui import launch_gui
if __name__ == "__main__":
raise SystemExit(launch_gui())
|
159b6d5a962e8b1c5664eff5da2db9846608bca9d41cc767e16b14061f211058 | Python | 173 | 6 | from topaz.torch import set_num_threads
def test_set_num_threads():
assert set_num_threads(0) == 0
assert set_num_threads(1) == 1
assert set_num_threads(-1) > 0 |
449c52abcbac094eaf66d6e98475a9d34a2225dfc868c5b68892ea47366701b9 | Python | 173 | 6 | from .coral import CORALTrainer
from .ddc import DDCTrainer
from .dann import DANNTrainer
from .dan import DANTrainer
from .ada import ADATrainer
from .jan import JANTrainer |
86cf4f0f5eefaa7cbb3d0fdaf4d376728d83e90589ba9058d07896990cac2df8 | Python | 173 | 7 | # __author__ = """Brian Szekely and Christian Sinnott"""
# __version__ = "0.0.1"
# # from . import (
# # vedb_calibration,
# # #utils,
# # #gait_analysis,
# # )
|
973f832066d8ed394c87668b356c96a5041719f9bfbed08e464d374af5614a61 | Python | 173 | 9 | from wonambi.attr import Surf
from wonambi.source import Morph
from .paths import surf_path
def test_source_morph():
surf = Surf(surf_path)
Morph(from_surf=surf)
|
f7ca205252dc29576a97390494aa2cd1be0f8d09695cb24e6f8923654771acf0 | Python | 173 | 7 | """Enhanced version of the ASE Espresso calculator."""
from __future__ import annotations
from quacc.calculators.espresso.espresso import Espresso
__all__ = ["Espresso"]
|
3cb95d950e0f4da69b37652cf94b895897d5e9f0ba65b02d8e7da32d9c324edc | Python | 174 | 8 | """
Tests for clustering
# Author: Vladan Lucic (Max Planck Institute for Biochemistry)
# $Id: __init__.py 840 2011-02-15 17:55:24Z vladan $
"""
__version__ = "$Revision$"
|
652151d060a23ad3292810d68c523b319a795d6da59446f41d20de217b35059b | Python | 174 | 5 | class InvalidUsage(Exception):
def __init__(self, message, status_code):
super().__init__()
self.message = message
self.status_code = status_code
|
6da6d5446b8177635b72c6b1477502e6f11fe97051a58e52e73c4b71593bcad0 | Python | 174 | 11 | import numpy as np
from topaz.metrics import average_precision, precision_recall_curve
def test_average_precision():
pass
def test_precision_recall_curve():
pass |
9a98f5fd78b29d127cd9b89846e2256ddf5e1d13b00407b56d736a746c1feba6 | Python | 174 | 9 | # coding: utf-8
cfg = {
'name': 'FaceBoxes',
'min_sizes': [[32, 64, 128], [256], [512]],
'steps': [32, 64, 128],
'variance': [0.1, 0.2],
'clip': False
}
|
c1e055c22833fda8f2a3fbe71bca81c2a19a1cab90de414d60e2b01e3fa32afd | Python | 174 | 6 | """Different methods for cross-validation."""
from hmp.crossvalidation.loo import LOOCV
from hmp.crossvalidation.pseudo_kfold import KFoldCV
__all__ = ["LOOCV", "KFoldCV"]
|
fdac930c3e253739463e0d248661d86d7accc870696f5d8265f70204dd3c92a9 | Python | 174 | 10 | from models.evaluator import Evaluator
from models.simclr import SimCLR
from models.common import LinearProbe
__all__ = [
'Evaluator',
'SimCLR',
'LinearPobe',
] |
5ad238a80906f16ba3343d5a0ad5bbee9fe55b2e16a8fe0f40ecdc4117162938 | Python | 175 | 5 | __author__ = 'martinez'
from .mcf_local_topology import main as mcf_local_topology
from .mcf_threshold import main as mcf_threshold
from .surf_recon import main as surf_recon |
91d146e2af3efc2be71b9b4bed58e5add3cd4c90f5ed4d1c51e03076aa39172b | Python | 175 | 4 | from . import coll, mesh
from .utils import path_resolve, resolve_file_path, set_obj_active
__all__ = ["coll", "mesh", "path_resolve", "resolve_file_path", "set_obj_active"]
|
954bbeb4fa8a0e5107f1e3de95e1a24bad471c227619d94890854d6c74095552 | Python | 175 | 7 | from .first_layers_block import BHIFirstLayersBlock
from .coreblock import BHICoreBlock
__all__ = (
"BHIFirstLayersBlock",
"BHICoreBlock",
)
|
d4a92d3d1d9db76485271730c8865e209677ed5655f77085caac4c55cbf83c0f | Python | 175 | 6 | from .fragment_merge import *
from .libfilter import *
from .energy_calculation import *
from .libs.io_inference import *
from .libs.models import *
from .libs.utils import *
|
dd9419bda447242565a0403e6f0444556107ebde90fb5be091ac303c8226db71 | Python | 175 | 5 | """Shared utilities for workflow scripts."""
from .io import load_files, to_numeric
from .matrix import row_normalize
__all__ = ["load_files", "to_numeric", "row_normalize"]
|
207bb953df6f32ce9fb3b0b08d777304ab2f681859f7116bdd7495af0ff35d90 | Python | 176 | 8 | import torch.distributed as dist
def get_rank() -> int:
if not (dist.is_available() and dist.is_initialized()):
return 0
else:
return dist.get_rank()
|
55809a856c5ac1ee9863ead52c234c186681016dd58278875e44d3f412bebba4 | Python | 176 | 4 | import os
import sys
sys.path.append(os.path.dirname(os.path.realpath(__file__)) + "/../../src")
sys.path.append(os.path.dirname(os.path.realpath(__file__)) + "/../../scripts") |
6fc9d0e2bd122111852abfd96d081120038c8cf64f2983a7f40c6e197270bcf9 | Python | 176 | 3 | from deeplabcut.pose_estimation_3d.camera_calibration import *
from deeplabcut.pose_estimation_3d.plotting3D import *
from deeplabcut.pose_estimation_3d.triangulation import *
|
9efe69979a5d77999a6640189c1a089c2f25e05ab95929dc7db0d349b7b55a99 | Python | 176 | 4 | """
Deprecated extractDeepcoderDataset.py module. This file only exists to support backwards-compatibility
with old pickle files. See bin/__init__.py for more information.
"""
|
3cccc933dc586d9e1c21cc647f6f5da8e6e1b6e6f4277e9d4b226e393acd8230 | Python | 177 | 10 | from memory_profiler import profile
@profile
def my_func():
a = [1] * (10 ** 6)
b = [2] * (2 * 10 ** 7)
del b
return a
if __name__ == '__main__':
my_func()
|
3dfc50b0dba4e85e3810301e2d4b04f577bc5e0be48b364236135268ac917ca8 | Python | 177 | 6 | import sys
from pybioshell.core.data.io import Pdb
from pybioshell.simulations.systems.surpass import SurpassModel
strctr = Pdb(sys.argv[1],"","True")
surpass = SurpassModel(c) |
5eebbd09a6af41b509056bf11af68ae5da1ea6f5b2f1dad1d72c623ca367c5d7 | Python | 177 | 6 | """Allow running the module with ``python -m regtools.ome_zarr_converter``."""
from regtools.ome_zarr_converter.launch import main
if __name__ == "__main__":
main()
|
08a09a339eda260371aa550c0e2f87f984643bc63721f13049682f90b35222aa | Python | 178 | 8 | #!/bin/env python3
'''
Print a list of all reactions
'''
from pdlfeynman.reaction import REACTIONS
for r in REACTIONS:
print(r.to_string(with_name=False), r.name, sep='\t')
|
4b38d5f3e66a8f00f65f3e02c6d751844ca6b54d9e0cc4e5360c052e2aad8691 | Python | 178 | 5 | from .baseentity import BaseEntity
from .item import ItemEntity
from .lexeme import LexemeEntity
from .mediainfo import MediaInfoEntity
from .property import PropertyEntity
|
539efdd36d1b3ca539fd633abf80ec8bfc4c04d776d625bca1bc8189dec4d062 | Python | 178 | 7 | # setup.py is only needed for editable installs (pip install -e .)
# All configuration is in pyproject.toml
from setuptools import setup
if __name__ == "__main__":
setup()
|
26e8460444ef9585c51feb36053cd98a8e03974e792693fb1793249939160030 | Python | 179 | 12 | from memory_profiler import profile
@profile
def my_func():
a = [1] * (10 ** 6)
b = [2] * (2 * 10 ** 7)
del b
return a
if __name__ == '__main__':
my_func()
|
38be2700a79d00ec6fb4aa6a2e45e74fb3b03e243bf189e5ec52f855347d02e8 | Python | 180 | 6 | # -*- coding: utf-8 -*-
from .model import BiaffineDependencyModel
from .parser import BiaffineDependencyParser
__all__ = ['BiaffineDependencyModel', 'BiaffineDependencyParser']
|
d23c1f0ef3371bf9fc9bbb9334ed814a46db7a99440f6c2c3ffb6fd7bde0244d | Python | 180 | 7 | import yaml
def load_config(config_path: str) -> dict:
""" Load configuration from YAML file. """
with open(config_path, 'r') as file:
return yaml.safe_load(file) |
4728a108b8af23d5f2d43d35541462a8dcd8c5c9f74e7dcf3dcdca15d2533fc5 | Python | 181 | 7 | import yaml
def load_config(config_path: str) -> dict:
""" Load configuration from YAML file. """
with open(config_path, 'r') as file:
return yaml.safe_load(file)
|
d3dd78445f35bf779f59b02f1dc1d0b1fd4d7f0d2d78203f9484eda7c0ba1f73 | Python | 182 | 7 | try:
import moabb
except ImportError:
raise ImportError(
"MOABB is not installed. Please install it by 'pip install moabb'.")
from .moabb_dataset import MOABBDataset |
08bab7e4283d7b1c1f98f1e5cc4f66b84a41a691175cd4a82b53e8bb9b053217 | Python | 183 | 4 | """
Copright © 2023 Howard Hughes Medical Institute, Authored by Carsen Stringer and Marius Pachitariu.
"""
from rastermap.rastermap import Rastermap, default_settings, settings_info |
321ba35370c6517850e9217a96036592eab7a6cbf52ab0ef262065cc2af28a7c | Python | 183 | 5 | from .arjun_vit import ArjunViT
from .simple_vit import SimpleViT
from .vanilla_transformer import VanillaTransformer
from .vit import ViT
from .LFP_Transformer import LFP_Transformer |
5a10d21f9de8befb3c2ef3ab064084b9bfa5b1509c673e29486bbf1996419631 | Python | 183 | 5 | """Discrimination metrics using risk predictions that vary over time."""
from .time_dependent_concordance import concordance_time_dependent
__all__ = ["concordance_time_dependent"]
|
1b42f7eaf2090e04a230b1fe67e9c6da626db2fb3136b9a77d871358f12051f6 | Python | 184 | 8 | from .network import DensityNetwork
def get_network(type):
if type == "mlp":
return DensityNetwork
else:
raise NotImplementedError("Unknown network typeß!")
|
2cb0565f0723513c5b8864f85b3a77e0c5fea0d336fbcdeab812f074f98a3a62 | Python | 184 | 5 | """Discrimination metrics evaluated at a single prediction horizon."""
from .area_under_ro_curve import auc, auc_cr, auc_cr_per_event
__all__ = ["auc", "auc_cr", "auc_cr_per_event"]
|
5172629734b953c084c4f638c61417a7b6fe0df753833a1d8e75c5b489810411 | Python | 184 | 14 | # -*- coding: utf-8 -*-
import os
PAD = '<pad>'
UNK = '<unk>'
BOS = '<bos>'
EOS = '<eos>'
NUL = '<nul>'
MIN = -1e32
INF = float('inf')
CACHE = os.path.expanduser('~/.cache/supar')
|
41df370dac9be034ac884dc35b3393a7a170f4f9c3ea1def7492758412ebbbbf | Python | 185 | 9 |
def another_func():
"""Undecorated function that allocates memory"""
c = [1] * (10 ** 6)
d = [1] * (10 ** 7)
return c, d
if __name__ == '__main__':
another_func()
|
ffe00d885f0c77824519158c8ade44d8d297b8fdc8b764034b33a65f93d90a89 | Python | 185 | 14 | # -*- coding: utf-8 -*-
"""
Created on Mon Jan 27 13:08:35 2020
@author: sayan
"""
import torch
def gpu_ts(x):
x = torch.tensor(x).float()
y = x.to("cpu")
return(y)
|
92b080d523bb6536b5a9b39e35477f1808eb1be164ea7a0f82ade09cbc64b39b | Python | 186 | 9 | from meegkit import sns
def apply_sns(data):
data_correctform = data.swapaxes(0, 2)
y, r = sns.sns(data_correctform)
data_return = y.swapaxes(0, 2)
return data_return
|
a086d3e6830138890eb22030ddde26e59fbc3332dd44ca97f79e29d7ad0456ef | Python | 186 | 7 | # Logger names
TRAIN_LOGGER_NAME = 'train'
HYPEROPT_LOGGER_NAME = 'hyperparameter-optimization'
# Save file names
MODEL_FILE_NAME = 'model.pt'
TEST_SCORES_FILE_NAME = 'test_scores.csv'
|
03bd8c1cf295ce8fc844f4ba773a10046bddcacf68ba8bdbd56502b5c127bdbc | Python | 187 | 9 | from __future__ import annotations
import importlib.metadata
import motor_intention as m
def test_version():
assert importlib.metadata.version("motor_intention") == m.__version__
|
be8227670e4e44d38dd03ce5ded3465a8f7c10af64be6388ea518300c705f646 | Python | 187 | 3 | from .src.mac_delta_array import mac_delta_array as mac_delta_array
from .src.mac_delta_bram import mac_delta_bram as mac_delta_bram
from .utils import load_and_plugin as load_and_plugin
|
d3c507a4b1cbf98316082b91359dc67f082fd123981ed6251590f97566da8c91 | Python | 187 | 8 | from gt4sd.frameworks.granular.train.core import (
parse_arguments_from_config,
train_granular,
)
args = parse_arguments_from_config("config_ae.ini")
train_granular(vars(args))
|
f211ecd0c550e1ab71b5732b8ac04ec930112484f95e59507c9ecf7c18f0942a | Python | 187 | 7 | import mmpose
from packaging import version
if version.parse(mmpose.__version__).major > 0:
from Pose_mmpose_new import Pose_mmpose
else:
from Pose_mmpose_old import Pose_mmpose
|
12ed23056b191070c1d68d5b0076d44440e22f3d707452a901c602394e7d7dec | Python | 188 | 3 | from .depthconv1d.depthconv1d import DepthConv1d as DepthConv1d
from .pointconv1dbn.pointconv1dbn import PointConv1dBN as PointConv1dBN
from .sepconv1dbn import SepConv1dBN as SepConv1dBN
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.