sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
b9cf40029b23ffcbd542d09837ba828ef2e09cb1445f720465a546245a094b0c | Python | 156 | 9 | from typing import NamedTuple
class _REGISTRY_KEYS_NT(NamedTuple):
X_KEY: str = "X"
U_KEY: str = "U"
VELOVI_REGISTRY_KEYS = _REGISTRY_KEYS_NT()
|
dd948322d90863586e0ab49d81430f603babc12b6079dd8adf2b0fc07aea1734 | Python | 156 | 2 | """paper2: interpretable KAN on three new FTIR food-adulteration matrices
(olive oil, coffee, fruit juice). Imports the shared, tested `kanfood` engine."""
|
cc71f175409ecb74794473931d672ed54ffd3d9e75cc7b91b2e49e6d7d22a4d3 | Python | 157 | 7 | from __future__ import annotations
from poetry.toml.exceptions import TOMLError
from poetry.toml.file import TOMLFile
__all__ = ["TOMLError", "TOMLFile"]
|
4a797c9e22aa8d500c273771fd72ad67c456db1f43990a156ab13f7e62685b92 | Python | 159 | 7 | from __future__ import annotations
from tests.fixtures.excluded_subpackage.example import __version__
def test_version():
assert __version__ == "0.1.0"
|
f8e0a26e528a393c689fbe0746dbde51b8e7f8e2e34a81cd0ce1d9d6b6bfdaf8 | Python | 159 | 7 | __author__ = 'Lei Zhang'
__emails__ = '2110610@tongji.edu.cn'
from .config import *
from .cps import *
from .utils_adata import *
from .utils_analys import *
|
0aaa16710f8f96ac6903c7bdb3b5a756a0221fe298774fcd3bcf01a8b127b773 | Python | 160 | 5 | from typing import Union
from .unet_ours import BeatGANsUNetModel, BeatGANsUNetConfig
Model = Union[BeatGANsUNetModel]
ModelConfig = Union[BeatGANsUNetConfig]
|
48c8addbdf046f59033025db3a5aeba2489b81a2cd440513808d02d2b8e7c89b | Python | 160 | 6 | """Model sub-packages and Hydra ``build_model``."""
from models.build import build_model
from models.unet import UNet
__all__ = ["UNet", "build_model"]
|
4faeb76fb4936ff0f2c38c6f60fd48f4e07bf06955c54900e3bb680a07922d0a | Python | 160 | 7 | from . import dataset_arrays
from .parametric_umap import prep_parametric_umap_dataset
__all__ = [
"dataset_arrays",
"prep_parametric_umap_dataset",
]
|
9b790f9f94ad11bf3d02d41a68d2706bfd9052bf2d949a09286accbe773b8241 | Python | 160 | 8 | """Plot utils"""
from .spatial_plot import (
plot_multi_patterns_spatial,
plot_markers,
niches_enrichment_barplot,
niches_enrichment_dotplot
)
|
f7c29992d076bde540e1fd68a292d6f6ebeeac1dd35372ebf0b83fed2845a39a | Python | 160 | 8 | from ._metadata import HubMetadata, HubModelCardHelper
from ._model import HubModel
__all__ = [
"HubModel",
"HubMetadata",
"HubModelCardHelper",
]
|
dbc60f518547ba160090edd3d39d3fa630caf7b9b6dfb8e735ee1c05365687ae | Python | 161 | 7 | import sys
from typing import TypeVar
if sys.version_info >= (3, 11): # noqa: UP036
from typing import Self
else:
Self = TypeVar("Self", bound="Self")
|
2237bf64f1af095b7175a2ffa27b62f288cbc9952c24ba5a06aee6e93fcde21d | Python | 162 | 6 | from .version import version as __version__
from .models import Evo
from .generation import generate
from .scoring import score_sequences, positional_entropies
|
4e0e113ce2f3d448e912fe2f9b0647f64910933e7dd1fccb542c3d98f0309806 | Python | 162 | 8 | from setuptools import setup, find_packages
setup(
name='BINND',
version='0.1.0',
packages=find_packages(where='src'),
package_dir={'': 'src'},
) |
891822c7efc3e44e5c0b6330bfed1eb7e2a716ef552ebd24e21b45c30b1d5906 | Python | 162 | 6 | from . import test_load
from . import test_predict
from . import test_prep
from . import test_spect_params
from . import test_train
from . import test_validators
|
bfb6e607ce8374ed3a4bb57423f15937c283ed7a7f328bdb07bed9b6d577c425 | Python | 162 | 7 | import setuptools
if __name__ == "__main__":
setuptools.setup(
name="nnunetv2",
packages=setuptools.find_packages(exclude=["docker"]),
)
|
236a59164265344f487ba2c004b9e76b3f260a7a910a41bcc0d44e8011828501 | Python | 164 | 7 | import gl
gl.resetdefaults()
gl.meshload('mni152_2009AO.mz3')
gl.overlayload('CIT168.mz3')
gl.shadername('MatCap')
gl.shadermatcap('Cortex')
gl.shaderxray(1.0, 0.9) |
40678f59c8465af4093e3cd49742d70fab5422ba690d97bb42a91ed2cefca5b5 | Python | 167 | 7 | import gl
print(gl.__doc__)
for key in dir( gl ):
if not key.startswith('_'):
x = getattr( gl, key ).__doc__
print(key+' (built-in function): ')
print(x) |
277cba159619825557955e04e3d30c4ee5ea240366eb985e3bb2ce8fd3d536d5 | Python | 169 | 12 | from . import (
functional,
)
from ._boundary_detection import (
PrecisionRecallFScoreRVal,
)
__all__ = [
"functional",
"PrecisionRecallFScoreRVal",
]
|
5d1d99bd173b51ba67ae2b55081523a23689ba0d2556f46017bfd1b587068dcb | Python | 169 | 7 | from pathlib import Path
import pgmpy_docs
if __name__ == "__main__":
docs_root = Path(__file__).resolve().parents[1]
pgmpy_docs.stage_docs_sources(docs_root)
|
b94ef59417222e1155a0eac7209c735f0f3a0204a8b519e40cc125a7b34e999a | Python | 169 | 8 | from gui_main_dialog import Main_Dialog
from PyQt5 import QtWidgets
import sys
app = QtWidgets.QApplication(sys.argv)
ui = Main_Dialog()
ui.show()
sys.exit(app.exec_()) |
d2b064af92216f9bff729ee58084b2accb65c5e28533d66d87f99189854e692a | Python | 169 | 8 | from setuptools import setup, find_packages
setup(
name="amp_bms",
version="1.0",
packages=find_packages(where="source"),
package_dir={"": "source"},
)
|
4bc007424582f21a295416998d4e6c6024621347c545a7fb3041ecb5e7a334d0 | Python | 170 | 8 | from .model import (
TransformerModel,
FlashTransformerEncoderLayer,
GeneEncoder,
AdversarialDiscriminator,
MVCDecoder,
)
from .grad_reverse import *
|
8ce40d6689eacbc401ad5f4fce8f53f5035ad49dfd09a9dfcf090318a299abbd | Python | 171 | 8 | """Preprocessing"""
from ._graph import get_nearest_neighbors
from .preprocess_utils import preprocessing
__all__ = [
"get_nearest_neighbors",
"preprocessing",
]
|
54668d23e0b44167c9023d4452d0974903f9578559733f8cc8102ae58fbed635 | Python | 172 | 4 | from ._create_criticism_report import create_criticism_report
from ._ppc import PosteriorPredictiveCheck
__all__ = ["PosteriorPredictiveCheck", "create_criticism_report"]
|
f9d36c594f8fcb843837cef154aaf6364e3172f1b84bf32d338f4bfaca5247c5 | Python | 172 | 5 | """Simulation dataset sub-package: synthetic spatial transcriptomics NPZ patch dataset."""
from .Simulation import ImagePatchDataset
__all__ = ["ImagePatchDataset"]
|
2b7ecd4d9e5a710c48c007474fa1ef2e69147350689ff1b783f237a31eb48c75 | Python | 174 | 9 | from __future__ import annotations
from abc import ABC
from abc import abstractmethod
class Formatter(ABC):
@abstractmethod
def format(self, msg: str) -> str: ...
|
521ac510a6223fe04fab61f727917572a849e42f8cfc60c56999fc4313593c27 | Python | 174 | 9 | from . import eval_, frame_classification, parametric_umap
from .eval_ import eval
__all__ = [
"eval",
"eval_",
"frame_classification",
"parametric_umap",
]
|
30af1c727c885b4cce4d661fd366eadb27d3b3316273c1f9d201f36250f39e14 | Python | 175 | 5 | from .aggregate import AttentionAggregation
from .embed import CellEmbedder
from .augment import GraphAugmentation
from .encode import GraphEncoder
from .swav import SwavHead
|
68703ac4c682bc44788f2217bff7685786c10221895c90ec044f51ac7350aa0f | Python | 176 | 4 | # Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
|
e2f3eaa0fd64622484de998ec10b9e41eb73acc72a24df5d3958f4dacc402074 | Python | 176 | 7 | from __future__ import annotations
from tests.masonry.builders.fixtures.excluded_subpackage.example import __version__
def test_version():
assert __version__ == "0.1.0"
|
6e2cdef053a6dd7d193faa39acba3b16abfb7449e187eab2e404d1b917db1f85 | Python | 177 | 3 | class MarkovNetwork:
def __init__(self, ebunch=None, latents=[]):
raise ImportError("`MarkovNetwork` is deprecated. Please use `DiscreteMarkovNetwork` instead.")
|
c01b2b1a2faa95b40c9c61ab9ff63881a8e4b8b86c11df4b66983be3ed1f1edc | Python | 177 | 5 | from ._version import __version__
from .mapping_utils import *
from .utils import *
from .plot_utils import *
from .mapping_parameter_tuning import mapping_hyperparameter_tuning |
df08e0cb14bbd5c619636d825979fc64705afa6c54ff970b4010027d2eb1ce83 | Python | 177 | 4 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
|
e1c1c3a58182ecd234339e2d51d86cf9c18701a010d800189fa5ec72813a74f7 | Python | 178 | 13 | from __future__ import annotations
class RepositoryError(Exception):
pass
class PackageNotFoundError(Exception):
pass
class InvalidSourceError(Exception):
pass
|
31542b9c9a07da21a2fbe624a09274a513d9253fc428916f7758f4cd4ed3fcdb | Python | 179 | 9 | from . import frame_classification, parametric_umap, train_
from .train_ import train
__all__ = [
"frame_classification",
"parametric_umap",
"train_",
"train",
]
|
f521c3b9bdf62d67c625a1dd8d8ae27682d44987437a3ab65a912fbedd9abc23 | Python | 179 | 10 | from __future__ import annotations
from typing import NamedTuple
class _VIVS_REGISTRY_KEYS_NT(NamedTuple):
Y_KEY: str = "Y"
VIVS_REGISTRY_KEYS = _VIVS_REGISTRY_KEYS_NT()
|
1dc44c6cc7eed068a3d5cee2e9ea51c2f9a45016869bcbcaa2f6758582ca7680 | Python | 182 | 9 | from typing import NamedTuple
class _METHYLVI_REGISTRY_KEYS_NT(NamedTuple):
MC_KEY: str = "mc"
COV_KEY: str = "cov"
METHYLVI_REGISTRY_KEYS = _METHYLVI_REGISTRY_KEYS_NT()
|
f2714081abc7e9fa46f22d289f5c21398f540a7d686c5bf5dd672c3a8bce48e4 | Python | 182 | 10 | import torch
from torch import nn
class ExpActivation(nn.Module):
def __init__(self):
super().__init__()
def forward(self, input):
return torch.exp(input)
|
3fead6e8361efea9bcfbe53422b591b115de298988ea51fdd13ec16d7704698c | Python | 183 | 4 | from ._model import RNAStereoscope, SpatialStereoscope
from ._module import RNADeconv, SpatialDeconv
__all__ = ["RNAStereoscope", "SpatialStereoscope", "RNADeconv", "SpatialDeconv"]
|
4c080dff5155ba5372faf0a544adfb69b162dcfbe36ae1036bf2263a3c9fec67 | Python | 183 | 3 | from lucent.modelzoo.inceptionv1 import InceptionV1 as inceptionv1
from lucent.modelzoo.inceptionv1 import InceptionV1_avgPool as inceptionv1_avgPool
from torchvision.models import *
|
4d92781bddfe52fa47539d4cadb98bb596678b2dceabc7c077d0c3cb47d79e22 | Python | 184 | 8 | from . import algorithms
from .split import frame_classification_dataframe, unit_dataframe
__all__ = [
"algorithms",
"frame_classification_dataframe",
"unit_dataframe",
]
|
ece56dfd7bd11131a0f0a2a0915e68872ebd474e79fe97916aa2596528492f43 | Python | 184 | 9 | from .eval import (
jensen_shannon_divergence,
mean_fide_score,
fide_score,
entropy,
heuristic,
mean_normalized_entropy,
)
from .spectral import spectral_stats
|
03671789cd69e9b6a77a4df3b893fff0a8d0d21f8bbf6aef16b7723112469e8d | Python | 185 | 7 | from __future__ import annotations
from poetry.plugins.application_plugin import ApplicationPlugin
from poetry.plugins.plugin import Plugin
__all__ = ["ApplicationPlugin", "Plugin"]
|
8f653e8958a327987b38459ad46a1b61cfa8e1c087ef327d369843ef7073834f | Python | 185 | 4 | from .biolip import BioLiPManager, BioLiPNRManager
from .scope import SCOPe40Manager, SCOPe95Manager, SCOPeManager
from .interpro import InterProManager
# from .ecod import ECODManager
|
d61a0a818b5b7bb35817cc7ccf12f8d78c6b3045553ed4d4ccfbf2700f2bea3c | Python | 186 | 7 | import os
from tractseg.experiments.base_legacy.tract_seg_legacy import Config as TractSegConfig
class Config(TractSegConfig):
EXP_NAME = os.path.basename(__file__).split(".")[0]
|
2d32f34e8322fe6b3bf451aa7e8b920aef0803799a0d68c1b6fa02da38f8cd5c | Python | 189 | 8 | """Functions for preparing a dataset for neural network models
from a dataset of spectrograms."""
from .prep import prep_spectrogram_dataset
__all__ = [
"prep_spectrogram_dataset",
]
|
912e4714c5fd0eed82e7af56fe82e9a573c83aec808ca9aa00e52938a923ff31 | Python | 189 | 5 | from .base import (economo_koskinas_spider, bb_moments_raincloud, bb_gradient_plot)
__all__ = ['economo_koskinas_spider',
'bb_moments_raincloud',
'bb_gradient_plot']
|
eeb93539eb123db435fdc4cc647c656c6947e1546f0aaf6734cf0fea59e20a72 | Python | 189 | 9 | from . import frame_classification, parametric_umap, predict_
from .predict_ import predict
__all__ = [
"frame_classification",
"parametric_umap",
"predict",
"predict_",
]
|
214d3c1f8ccb18bb82d4573e408b7cf9bf16396bc9cbab09be777cde70ab659d | Python | 190 | 13 | import jax
import pytest
@pytest.fixture(scope="session")
def helpers():
return Helpers
class Helpers:
@staticmethod
def rng(seed=0):
return jax.random.PRNGKey(seed)
|
3c32f564ae9ba8f93aaa5a8e3cdea5a070182c45d906d6c397c1d17b08d0bcef | Python | 190 | 8 | import os
from tractseg.experiments.peak_reg_angle import Config as PeakRegConfig
class Config(PeakRegConfig):
EXP_NAME = os.path.basename(__file__).split(".")[0]
CLASSES = "All"
|
45d3d53178bfdb20285b3335a8008007c7f53b140494567bc163936626216a3f | Python | 190 | 8 | from __future__ import annotations
from poetry.core.exceptions import PoetryCoreError
from tomlkit.exceptions import TOMLKitError
class TOMLError(TOMLKitError, PoetryCoreError):
pass
|
33a8f4a6ec41db9ec6446c8772624f904969a87433c738a3bf4d272f0e2a6652 | Python | 191 | 6 | import os
from tractseg.experiments.base_legacy.endings_seg_legacy import Config as EndingsSegConfig
class Config(EndingsSegConfig):
EXP_NAME = os.path.basename(__file__).split(".")[0]
|
bbe85712b04dd2642597525c69ab792300045b626c5f513214ec6cd226a7dfeb | Python | 192 | 4 | from .cluster_validator import ClusterValidator
from .polished_louvain import PolishedLouvain
from .polished_surprise import PolishedSurprise
from .unpolished_louvain import UnpolishedLouvain
|
6a379c9b2843fc7955c3333d837f625debfca52a730eac4a10af21914fc7f070 | Python | 193 | 10 | # -*- coding: utf-8 -*-
"""
Created on Mon Mar 13 15:11:46 2023
@author: tnguyen
"""
from mne.fiff import read_evoked
evoked = read_evoked('ctf-ave.fif')
print(type(evoked)) |
706d0c35642d553601c6f00d49e62c8941bb9208df8fee571f99625294182efc | Python | 196 | 6 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
version = "0.2.2"
|
b9d7d3cb22cb7c62071bea73ecb717fe58d32b77dbbd32446203138cd69de13c | Python | 197 | 9 | from __future__ import annotations
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
SRC = ROOT / "src"
if str(SRC) not in sys.path:
sys.path.insert(0, str(SRC))
|
2eaab1dfe06f705d757a59e2da872492099f3440937ecea835ec1a993b202b82 | Python | 198 | 7 | from __future__ import annotations
from poetry.repositories.repository import Repository
from poetry.repositories.repository_pool import RepositoryPool
__all__ = ["Repository", "RepositoryPool"]
|
6eedfaaa1a19dd612fc44784b7e9542532c4b718e408c14d098eac7631a2d8a9 | Python | 199 | 6 | from typing import Union
from .diffusion import SpacedDiffusionBeatGans, SpacedDiffusionBeatGansConfig
Sampler = Union[SpacedDiffusionBeatGans]
SamplerConfig = Union[SpacedDiffusionBeatGansConfig]
|
1568328eb2ddc8028d9ffc831ab348ff7179bb233cf37ca34bd564959260ed9d | Python | 201 | 9 |
from tractseg.experiments.base_legacy.dm_reg_legacy import Config as DmRegConfig
class Config(DmRegConfig):
DATASET = "HCP_32g"
RESOLUTION = "2.5mm"
FEATURES_FILENAME = "32g_25mm_peaks" |
95bc41867438454585e39aaad7b5f76c804def5b554fce3ee164036ff678bb58 | Python | 201 | 3 | from ._utils import _icalabel_to_data_frame, _report_flagged_epochs
from .check import import_optional_dependency, _validate_kwargs
from .html import _get_ics, _sum_flagged_times, _create_html_details
|
47856f523e0acdcc7935142d94d22ce4bcc8463d6c61f0299f588b1132f2d1fa | Python | 202 | 8 | import zipfile
from nnunetv2.paths import nnUNet_results
def install_model_from_zip_file(zip_file: str):
with zipfile.ZipFile(zip_file, 'r') as zip_ref:
zip_ref.extractall(nnUNet_results) |
78375a0af61bde097f955b6c23626de51318679b80ece9ac210ab5b9d31f71e2 | Python | 202 | 9 |
from tractseg.experiments.base_legacy.dm_reg_legacy import Config as DmRegConfig
class Config(DmRegConfig):
DATASET = "HCP_32g"
RESOLUTION = "2.5mm"
FEATURES_FILENAME = "32g_25mm_peaks"
|
db15456de8c2cb7b1af8b9b71d1cd7891b5316af269d745d84aaf7aa2afd3561 | Python | 202 | 11 | from __future__ import annotations
from pathlib import Path
from poetry.layouts.layout import Layout
class SrcLayout(Layout):
@property
def basedir(self) -> Path:
return Path("src")
|
0ad2d9dfa49779cbeb457d5c87903056d225f10594c3c77d7d8a5cbad6483208 | Python | 203 | 7 | # This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from .model import * # noqa
from .mha import * # noqa
from .hydra import *
|
2bab511e5bd2040f773ca1caf6febc41ac9bb95a05ab35677fc01a59c5a5c01e | Python | 203 | 6 | import polars as pl
pl.read_csv("nextflow_results/orfanage/novel_peptides.csv")\
.unique("pep")\
.select("pep", "transcript_id", "gene_name")\
.write_csv("export/TableS2_novel_peptides.csv") |
b7e3e7edec3fe4cf6cde8897d6b541a42b3415dc3983c580d04409dabff82fd2 | Python | 204 | 5 | from .decoders import GATDecoder, GCNDecoder
from .encoders import GATEncoder, GCNEncoder
from .utils import DSBatchNorm
__all__ = ["GATDecoder", "GCNDecoder", "GATEncoder", "GCNEncoder", "DSBatchNorm"]
|
0d21527cac25be9626ed6c0fa8dc345cb0200b25f52730aadfc264b15102c9b0 | Python | 205 | 11 | import json
import config
with open(config.brenda_json) as brenda_json:
brenda = json.load(brenda_json)
enzymes = list(brenda["data"].keys())
# exclude "spontaneous reaction"
enzymes = enzymes[1:]
|
511b06b385a576ddeb5ea225af61f3ad35403c208de56aa99d04742ece06d57a | Python | 205 | 8 | import gl
gl.resetdefaults()
gl.meshload('BrainMesh_ICBM152.rh.mz3')
gl.overlayload('motor_4t95mesh.rh.mz3')
gl.overlaycolorname(1, 'red')
gl.shaderxray(1.0, 0.3)
gl.azimuthelevation(110, 15)
gl.meshcurv() |
03aafc086da2bc63bf0a643faf5a1aa9ae9048e9ac595a640a1320b80be15ced | Python | 206 | 6 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from . import unity # noqa
|
16d4aa3c9f4d1af448e18abfcc0222c96aec2c6f7980a26a496a7184477d38a5 | Python | 206 | 8 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'UI/scheduleBeastUI.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
|
e63d83032df26c74712315564ee9545d7f01bddea41c636a9fde3bac29cc0f3e | Python | 206 | 8 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import importlib
import os
|
25ca4920e4d0ca9894df3aa750aaecdd55d278a0a7a1c1a63052b85555d656f0 | Python | 207 | 6 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from . import models # noqa
|
4ef3ae28fa75d3610e7f0f22e54bbfa4845798f80087ec5bb41b6fb38d799a1b | Python | 207 | 9 |
from tractseg.experiments.base_legacy.peak_reg_legacy import Config as PeakRegConfig
class Config(PeakRegConfig):
DATASET = "HCP_32g"
RESOLUTION = "2.5mm"
FEATURES_FILENAME = "32g_25mm_peaks" |
643505608de56f80085446747db8fd251c0e6aa8777561eebf1f36c49e4655e9 | Python | 207 | 6 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from .model import * # noqa
|
335d4c755a42a3be935c9a58163f5132d136fd0192e3e4ef33b8c76a25217e3d | Python | 208 | 9 |
from tractseg.experiments.base_legacy.peak_reg_legacy import Config as PeakRegConfig
class Config(PeakRegConfig):
DATASET = "HCP_32g"
RESOLUTION = "2.5mm"
FEATURES_FILENAME = "32g_25mm_peaks"
|
7d4ca717299dd28a24607dc5664e569d4ce9934c5b984e122085b1c206e82eb3 | Python | 208 | 6 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from . import rxf_src # noqa
|
330cd05baf8a9721e3f666c2b89171e0965cab1253cc8dce0a8e5f0b7efbc5cf | Python | 209 | 8 | import os
from tractseg.experiments.base_legacy.tract_seg_legacy import Config as TractSegConfig
class Config(TractSegConfig):
EXP_NAME = os.path.basename(__file__).split(".")[0]
USE_DROPOUT = True
|
3ff11402ec15e0f6ef4e255d41ebf79ee657e703cb637efce6ef2cae890f8783 | Python | 209 | 5 | from .model.binn import BINN
from .model.dataloader import BINNDataLoader
from .model.trainer import BINNTrainer
from .model.pathway_network import PathwayNetwork
from .analysis.explainer import BINNExplainer
|
3cf56d1963d8e7c5ad42f5e49fbdfeb996b9e042977fc973931fc6771973e5bd | Python | 210 | 9 |
from tractseg.experiments.base_legacy.tract_seg_legacy import Config as TractSegConfig
class Config(TractSegConfig):
DATASET = "HCP_32g"
RESOLUTION = "2.5mm"
FEATURES_FILENAME = "32g_25mm_peaks" |
1d0ae99fbe96e82110d68e5d15581f2a2de66b875ed0693fecdc3b8352f98e1a | Python | 211 | 9 |
from tractseg.experiments.base_legacy.tract_seg_legacy import Config as TractSegConfig
class Config(TractSegConfig):
DATASET = "HCP_32g"
RESOLUTION = "2.5mm"
FEATURES_FILENAME = "32g_25mm_peaks"
|
a3a16ed5aa65a9a9032fc1bdbdaecc02ab70a30bdbd79822c161119e2a81951a | Python | 211 | 9 | """
Highly variable gene selection.
"""
import scanpy as sc
def hvg(adata_sc):
sc.pp.highly_variable_genes(adata_sc, n_top_genes=4000)
return list(adata_sc[:,adata_sc.var["highly_variable"]].var_names) |
dafb4cee15f3f3feb813bcd23e38c104431620c9de073ca3fbc41caed0a06815 | Python | 211 | 10 | from mentor._version import __version__
from mentor import _cluster as cluster
from mentor import _metrics as metrics
# __version__ = get_version()
__all__ = [
'__version__',
'cluster',
'metrics'
]
|
fc756c2ba3ea05a62aa982e44b67715015a1533c96b1184042959cdfd6f27853 | Python | 211 | 13 | from __future__ import annotations
class SetRelation:
"""
An enum of possible relationships between two sets.
"""
SUBSET = "subset"
DISJOINT = "disjoint"
OVERLAPPING = "overlapping"
|
22784e0a907d36e4d550df1647360df4ef4ca8e57c4dacd1005b6352748b09f0 | Python | 214 | 6 | # Re-export the primary trainer so downstream users can do:
# from nnunetv2.training.distillation.trainers import DistillationTrainer
from ..distiller import DistillationTrainer
__all__ = ["DistillationTrainer"]
|
1431964c924bb24190a69201ae5e810b5db305938ec0a1459e736be61c92399b | Python | 215 | 7 | import torch
print(torch.cuda.is_available())
print(torch.cuda.current_device())
if torch.cuda.is_available():
print(f"Cuda is Availabe count={torch.cuda.device_count()}")
else:
print("Cuda Can't be found")
|
5ae41ac5162cda2b1552572979b5db76904c24cc184641a4bebb8314504eade3 | Python | 215 | 7 | """DIAGVI model for multi-modal integration with guidance graphs."""
from ._model import DIAGVI
from ._module import DIAGVAE
from ._task import DiagTrainingPlan
__all__ = ["DIAGVI", "DIAGVAE", "DiagTrainingPlan"]
|
e75f1efc90b51be2459cef208255b4cc82d58f3031a7028947aa34f0be0f14d0 | Python | 215 | 6 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from . import transformer_pg # noqa
|
855b75ed06d5ccdfd76a52f006b209e58130ae1fcf13f460dc4c40cd2d5d7f48 | Python | 216 | 6 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from . import translation_moe # noqa
|
a59c2cb0c3553ba5ee33cf057ba993a6565510baf05a35633fc8f9c1e62bac0f | Python | 216 | 9 |
from tractseg.experiments.base_legacy.endings_seg_legacy import Config as EndingsSegConfig
class Config(EndingsSegConfig):
DATASET = "HCP_32g"
RESOLUTION = "2.5mm"
FEATURES_FILENAME = "32g_25mm_peaks" |
f983187addb65a1c1f33534720845c19fb8e670ee39dabd714e455e29d10e606 | Python | 216 | 6 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from .rerank_options import * # noqa
|
33a466c077465e8697a9a4e094146afe33cf8d7149e9131d0d078922b959b03f | Python | 217 | 19 | import sys
sys.path += []
import argparse
def main():
pass
def get_args():
parser = argparse.ArgumentParser()
return parser.parse_args()
if __name__ == '__main__':
args = get_args()
main()
|
88837bc3db33d317feb399a4d0af6e7fd3269e037a01fb3f2aa23b3cb1920888 | Python | 217 | 8 | import gl
gl.resetdefaults()
gl.meshload('BrainMesh_ICBM152_smoothed.lh.mz3')
gl.meshcurv()
gl.shadername('hidecurves')
gl.overlayload('CIT168.mz3')
gl.shaderforbackgroundonly(1)
gl.shaderadjust('curvthreshhi', 0.44)
|
be5cb08c2d361cc7809592167b2fdc3bd9ad5f490d2d75ba6ee19848d853d4c1 | Python | 217 | 9 |
from tractseg.experiments.base_legacy.endings_seg_legacy import Config as EndingsSegConfig
class Config(EndingsSegConfig):
DATASET = "HCP_32g"
RESOLUTION = "2.5mm"
FEATURES_FILENAME = "32g_25mm_peaks"
|
b0849bb14dfbb6ece72f0b5816bb84f5f50be35314645c6fe6291b9730648409 | Python | 218 | 10 |
from tractseg.experiments.base import Config as BaseConfig
class Config(BaseConfig):
EXPERIMENT_TYPE = "dm_regression"
LABELS_TYPE = "float"
THRESHOLD = 0.01
FEATURES_FILENAME = "12g90g270g_CSD_BX"
|
ca647429617eb33e90ff50a993b67b992d300fa6a011fcb50e62038a28b01c75 | Python | 218 | 3 | class BayesianNetwork:
def __init__(self, ebunch=None, latents=set(), lavaan_str=None, dagitty_str=None):
raise ImportError("`BayesianNetwork` is deprecated. Please use `DiscreteBayesianNetwork` instead.")
|
5232e4f8e01f8c6526127a407c8675d173992ccb303862824b9bfae318937402 | Python | 219 | 9 | import gl
gl.resetdefaults()
gl.meshload('mni152_2009.mz3')
gl.overlayload('motor_4t95mesh.mz3')
gl.clipazimuthelevation(0.37, 0, 140)
gl.shaderambientocclusion(0.5)
gl.azimuthelevation(90, 20)
gl.shaderxray(1.0, 0.3)
|
a88894968d12cdb1da4e65ebcd1cdefdc9eb4cec625192b411193355f94c4088 | Python | 219 | 10 | from . import curvefit, dirname, frame_classification, learncurve
from .learncurve import learning_curve
__all__ = [
"curvefit",
"dirname",
"frame_classification",
"learncurve",
"learning_curve",
]
|
d294dbdb04b43d5dd1775016707809c3f280ef37fbe22d04e89fe25d649d50c3 | Python | 219 | 6 | import torch
print("torch :", torch.__version__)
print("cuda? :", torch.cuda.is_available())
print("cuda runtime :", torch.version.cuda)
if torch.cuda.is_available():
print("device :", torch.cuda.get_device_name(0)) |
99af0d8eb880e52e967cf4544fcf7278c84c5d97fcb000f3ef2c7134a42cd350 | Python | 220 | 12 | VERSION = '1.2.7'
_items = VERSION.split('-')
VERSION_NUMBER_PARTS = tuple(int(i) for i in _items[0].split('.'))
if len(_items) > 1:
VERSION_STATUS = _items[1]
else:
VERSION_STATUS = ''
__version__ = VERSION
|
ed4242fc7f0f111576267362253c155099209088db44f0060a3500c7e7562ab7 | Python | 220 | 6 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from . import commonsense_qa_task # noqa
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.