sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
be71933512c97e070dea8e17dd11c8c310d945ea68943d1a1b44b61c9c20458f | Python | 239 | 10 | # This file is part of connectome-manipulator.
#
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2024 Blue Brain Project/EPFL
import connectome_manipulator.connectome_comparison.properties as test_module
def test_null():
pass
|
010fbbbcfd279903039ea5a56188470d679509b73ef93241e2995ab852ae093f | Python | 240 | 8 | """
The `common_mice` schema is maintained by another package and is included here for ease of reference.
DO NOT create new tables here.
"""
import datajoint as dj
schema = dj.schema('common_mice', locals())
schema.spawn_missing_classes()
|
5a4f2c56bd9d59ecb88fa491dc23f01ec370f6fc49ad4065aa234510c1fd4a6e | Python | 240 | 4 | #!/usr/bin/env python3
import sys, runpy
sys.argv = ['evaluate_ensemble_and_generate_distillation_data.py', '--dataset', 'DeepSTARR'] + sys.argv[1:]
runpy.run_path('evaluate_ensemble_and_generate_distillation_data.py', run_name='__main__')
|
89f4844609dcbef68cb0c11d8e7a87c8abae1d2db6193c39a76ba62e72672bf2 | Python | 240 | 4 | #!/usr/bin/env python3
import sys, runpy
sys.argv = ['evaluate_ensemble_and_generate_distillation_data.py', '--dataset', 'lentiMPRA'] + sys.argv[1:]
runpy.run_path('evaluate_ensemble_and_generate_distillation_data.py', run_name='__main__')
|
9ada55d119794c048f4489d06736fb898867129544ca27a4f9a8fef4831d02bc | Python | 240 | 10 | from os.path import join, dirname
from subprocess import call
from sys import exit, argv
def main():
exe_path = join(dirname(__file__), "../bin/dynamont-NTC")
exit(call([exe_path] + argv[1:]))
if __name__ == "__main__":
main() |
0d85528dca80361ad340d46c958cc94f3e847391b91790bb4d0d01fab332779c | Python | 241 | 7 | # -*- coding: utf-8 -*-
"""This sub-package provides utility functions used throughout the package
"""
#:copyright: Copyright 2015 by Christoph Kirst, The Rockefeller University, New York City
#:license: GNU, see LICENSE.txt for details.
|
479a02648fed10205efd6f0bf0ca7ea3fcb0f01cf17ef6bba6e366afc9949919 | Python | 241 | 9 | from setuptools import setup,find_packages
setup(name = "NER_Biomedical",
version = "1.0",
description = "NER_Biomedical project",
author = "Son Ba",
author_email = "bagiangson2001@gmail.com",
packages=find_packages()
) |
54dfbc252ed71480d4f0cdfdf516ecfbe44efd0f6c3c64b158e7039f2906c91b | Python | 241 | 4 | P={'B': {'E': -0.510825623765990, 'M': -0.916290731874155},
'E': {'B': -0.5897149736854513, 'S': -0.8085250474669937},
'M': {'E': -0.33344856811948514, 'M': -1.2603623820268226},
'S': {'B': -0.7211965654669841, 'S': -0.6658631448798212}}
|
98256ab0598f2b06708e05d99e67b0078336afaef71f8570f7de1c413e77d0dd | Python | 241 | 10 | # Copyright (C) CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
class BadFunctionError(Exception):
"""
An exception that signifies that an auto-detection function has violated some constraint
set by its interface.
"""
|
d853a57514da0a5c1213894f1cc22ba6a6d7981ddf8a71194d1f4b5297bc5147 | Python | 241 | 10 | # This file is part of connectome-manipulator.
#
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2024 Blue Brain Project/EPFL
import connectome_manipulator.connectome_comparison.connectivity as test_module
def test_null():
pass
|
4a51ba763b52b9d988510b7000225cce1f4551f17698eeff34917f0ba6fdfc39 | Python | 242 | 11 | '''Like ogopogo, osteoporosis is elusive'''
__all__ = (
'__version__',
'version_info',
)
from pbr.version import VersionInfo
_v = VersionInfo('ogo').semantic_version()
__version__ = _v.release_string()
version_info = _v.version_tuple()
|
4b2f4b5b373a067792ac94efe6ca12371313cbbd0216423b45c7fc5b1ab5dc60 | Python | 242 | 3 | # from .PASTE import pairwise_align, center_align
# from .helper import kl_divergence, intersect, match_spots_using_spatial_heuristic, filter_for_common_genes
# from .visualization import plot_slice, stack_slices_pairwise, stack_slices_center |
8732fadd171ee9591984fe0b7229bd2ca8da762c5a406f3a9caa8f864ec8912d | Python | 242 | 5 | # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
from .base import add_integration_callbacks, default_callbacks, get_default_callbacks
__all__ = "add_integration_callbacks", "default_callbacks", "get_default_callbacks"
|
a2eed45e16a02b9ebd7bafa9f53f6df0a4fa0ffcb26cfeecac9877aafbfac6db | Python | 242 | 6 | # Copyright (C) CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
# Backward compatibility stub; TODO: remove when it's safe
from cvat.apps.engine.media_io.frame_provider import * # pylint: disable=unused-import, disable=wildcard-import
|
e6ab90f51842c35759ba8c409918bebe468bbe90eacc34778eb751e05d17c844 | Python | 242 | 8 | import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('Hojin_Jang_ResNet50_Strong_blur')
assert model.identifier == 'Hojin_Jang_ResNet50_Strong_blur'
|
4a7a645eae19c1c18e5a165afedf14163249ba360e41f9f4d8308a9f0dbb08ae | Python | 243 | 4 | from .base_tester import BaseTester
from .global_embedding_space import GlobalEmbeddingSpaceTester
from .global_twostream_embedding_space import GlobalTwoStreamEmbeddingSpaceTester
from .with_same_parent_label import WithSameParentLabelTester
|
1cac653d552c6e0cb4092044a2aa81ed0d1b70dd21656eb36578231a05e43570 | Python | 244 | 8 | import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('Zejin_Lu_dvd_s_imagenet_resnet50')
assert model.identifier == 'Zejin_Lu_dvd_s_imagenet_resnet50'
|
5a869addf14a6c0c94b30c0779fca41bcc20a00fb2f167d7757056bf1496d412 | Python | 244 | 8 | import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('convnext_tiny_imagenet1k_TA_GELU')
assert model.identifier == 'convnext_tiny_imagenet1k_TA_GELU'
|
5cc0d5e24c40ee1cc82a9dfd35e71a1c6a4db7834f3ded55adec8374fb4c9f1a | Python | 244 | 8 | import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('convnext_tiny_imagenet1k_HANDsum')
assert model.identifier == 'convnext_tiny_imagenet1k_HANDsum'
|
8e7e79df016ce3f402e2ccf97b43888a2b04228e2c5f8e23d62e5a544d496b1e | Python | 244 | 8 | import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('convnext_tiny_imagenet1k_GELU_PS')
assert model.identifier == 'convnext_tiny_imagenet1k_GELU_PS'
|
95b7c37f2a2c0607d6025b051f13189df633179b80eb816725f1969bb9ef43a5 | Python | 244 | 8 | import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('Zejin_Lu_dvd_p_imagenet_resnet50')
assert model.identifier == 'Zejin_Lu_dvd_p_imagenet_resnet50'
|
a5ba8e87d17d9e47b5725350c40216a365993732e73b64133cfdc45596863a23 | Python | 244 | 8 | import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('convnext_tiny_imagenet1k_HAND_PS')
assert model.identifier == 'convnext_tiny_imagenet1k_HAND_PS'
|
e0eb75f687099773b4ae542425796843a2a048da816ad04fb4a721f37b3d8faa | Python | 244 | 8 | from typing import TypedDict, Annotated
from langgraph.graph import add_messages
from langgraph.managed.is_last_step import RemainingSteps
class State(TypedDict):
messages: Annotated[list, add_messages]
remaining_steps: RemainingSteps |
e17cad989548464545252f6e6dd68d7b452d79db1aadd6e54c9fdc28905c01e4 | Python | 244 | 8 | import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('Zejin_Lu_dvd_b_imagenet_resnet50')
assert model.identifier == 'Zejin_Lu_dvd_b_imagenet_resnet50'
|
b0ec3d17ebcd7522f4c032abcf01a60f639f53c5caee2451590095b5d52b8923 | Python | 245 | 8 | from . import brain_generator
from . import brain_generator
from . import estimate_priors
from . import labels_to_image_model
from . import metrics_model
from . import model_inputs
from . import training
from . import fine_tuning_with_adversary
|
c4cbfd59251d3e1ae521347f4a9ff035c28eaeead618a1e72bc62cb65f665138 | Python | 245 | 7 | # encoding : utf-8
"""This module implements functionailty for converting to and from miniscoPy
objects (https://github.com/PeyracheLab/miniscoPy).
Specifically we may want to convert to and from their trace class, and
perhaps others, too.
"""
|
df4afcd0b4eaf9858108e7ae27a8a74af58cefb630d615a9e74066e799525dc7 | Python | 245 | 7 | """
Data structures and tools for working with Position Weight Matrices (PWMs).
TODO: Some of the packages in this directory are actually command line
programs that provide no library functions and should be moved to the
scripts directory.
"""
|
2928cf7e669fab37d782907046246df5cc092c7a2a55c61c1e2922f7c00f8249 | Python | 246 | 7 | """__init__.py."""
from splotch.inference import run_nuts, run_svi
from splotch.registration import register
from splotch.utils import get_input_data, savagedickey
__all__ = ["get_input_data", "register", "run_nuts", "run_svi", "savagedickey"]
|
958c88024ea482597c50f448d0c00179f8ef08692815b562a20dfb6f03825f27 | Python | 246 | 7 | # encoding : utf-8
"""This module implements functionailty for converting to and from Brian objects
(https://brian2.readthedocs.io/en/stable/)
Specifically we may want to convert to and from their trace class, and
perhaps others, too.
"""
|
b4435d9dc19a82a8f764bdb81fa59003139f1cb3845db5f934b808d14a6500d6 | Python | 246 | 10 | import glob
import os
from pathlib import Path
md_files = glob.glob("../*/*.md")
for md_file in md_files:
new_parts = list(Path(md_file).parts[:-1]) + ["readme.md"]
new_file_name = Path(*new_parts)
os.rename(md_file, new_file_name)
|
bc28ed02d4e2cd1f643dc2373e974437736f68d79c5233a0ad2c1f21a476840a | Python | 246 | 12 | """Runs the production web interface for ADMET-AI (Gunicorn)."""
from flask import Flask
from admet_ai.web.app import app
from admet_ai.web.run import setup_web
def build_app(*args, **kwargs) -> Flask:
setup_web(**kwargs)
return app
|
d37ea6919d351c9df726966cb8b558b9d5e0eb44a264e3364b4998d243102f5e | Python | 246 | 10 | from os.path import join, dirname
from subprocess import call
from sys import exit, argv
def main():
exe_path = join(dirname(__file__), "../bin/dynamont-NT-banded")
exit(call([exe_path] + argv[1:]))
if __name__ == "__main__":
main() |
dfdbfbe3bd121fa81c08466735861468724bce1a7e5f2e7ae40a010a6aea8bee | Python | 246 | 4 | from diffxpy.testing.utils import constraint_matrix_from_string, constraint_matrix_from_dict, \
constraint_system_from_star
from diffxpy.testing.utils import design_matrix
from diffxpy.testing.utils import view_coef_names, preview_coef_names
|
e3e284bf6f586f474c6a55a31f39707e2a496737b6addb7d0e5019c498eb7eb5 | Python | 246 | 10 | """ Numerical constants relevant for IVIM. """
import numpy as np
# Gyromagnetic constant
ybar = 42.577e6 # Hz/T
y = 2 * np.pi * ybar # rad/s/T
# Diffusion coefficient of blood
Db = 1.75e-3 # mm2/s, see Ahlgren et al 2016 NMR in Biomedicine |
08dc4494a680aae47ec09ffcb064cd556627ffa8f3ac76c416620506657f94a3 | Python | 247 | 8 | import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('cvt_cvt-w24-384-in22k_finetuned-in1k_4')
assert model.identifier == 'cvt_cvt-w24-384-in22k_finetuned-in1k_4' |
0e9cae056261a324c7b14d90a4c9b9c232090f9302bab8c5355ce2a8ad978d0d | Python | 247 | 8 | """Utilities for FastSurfer crop management."""
from .ensure_fastsurfer_crops_exists import (
ensure_fastsurfer_crop_exists,
ensure_fastsurfer_crops_exists,
)
__all__ = ['ensure_fastsurfer_crop_exists', 'ensure_fastsurfer_crops_exists']
|
b638939e1e497220c84bae58643600e382d2dff041723beaa3ff366d772064c7 | Python | 247 | 8 | from tests.utils import pytest_importorskip
def test_qtquickcontrols2():
"""Test the qtpy.QtQuickControls2 namespace"""
QtQuickControls2 = pytest_importorskip("qtpy.QtQuickControls2")
assert QtQuickControls2.QQuickStyle is not None
|
fb78311d815c7ffd6e43c928a177c11eb4bd1ce364d11fb849a46ab196a02bea | Python | 247 | 4 | from kinescope.prediction.train import train_and_evaluate, load_features_and_labels
from kinescope.prediction.models import get_model, SUPPORTED_MODELS
__all__ = ["train_and_evaluate", "load_features_and_labels", "get_model", "SUPPORTED_MODELS"]
|
02e9dfb4450ce651e9bd95f1b672d0f2dd202fd1ec285d67b3630f4c4f4538a0 | Python | 248 | 8 | import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('convnext_tiny_imagenet1k_HAND_crop')
assert model.identifier == 'convnext_tiny_imagenet1k_HAND_crop'
|
3a4cf1cb1fef86aabde4fc115661872baacca23a74165de5e7989aec5264ed91 | Python | 248 | 8 | import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('convnext_tiny_imagenet1k_GELU_crop')
assert model.identifier == 'convnext_tiny_imagenet1k_GELU_crop'
|
638c676ff1af201a2aead9897fd4baa3bca4582fd7135b1510c8166f256bb4e5 | Python | 248 | 11 | import datetime
__version__ = "0.1.0"
__author__ = "Thomas Sanchez"
__copyright__ = f"{datetime.date.today().year}, {__author__}"
__email__ = "thomas.sanchez@unil.ch"
__url__ = "https://github.com/Medical-Image-Analysis-Laboratory/fetmrqc_sr"
|
a3a97d30b0038cbc3cc4327424cc122f27b76b95c3670e3781ac2c1b5e9a3c37 | Python | 248 | 8 | import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('convnext_large_clip_laion2b_finelayers')
assert model.identifier == 'convnext_large_clip_laion2b_finelayers'
|
c33ca7ec0f7a69ae850683af69eee38ac810709ad4cd6fb8ea8826e60b22d773 | Python | 248 | 8 | import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('convnext_tiny_imagenet1k_APGD_GELU')
assert model.identifier == 'convnext_tiny_imagenet1k_APGD_GELU'
|
e98f8c56e4c20f04baa46fe1f9ca704129111b165c78796e179715be6d88bc33 | Python | 248 | 5 | from brainscore_vision import benchmark_registry
from .benchmark import Gifford2022
benchmark_registry['Gifford2022.IT-ridge'] = lambda: Gifford2022('IT', 'ridge')
benchmark_registry['Gifford2022.IT-ridgecv'] = lambda: Gifford2022('IT', 'ridgecv') |
1bde9e44e9772c99b1650b15b0198ecf30fb2a58e1c1de64543671bcd526b62d | Python | 249 | 7 | """Surface Morphometrics: quantification of membrane surfaces from cryo-ET.
See https://github.com/baradlab/surface_morphometrics and the `morphometrics`
command line interface (defined in `surface_morphometrics.cli`).
"""
__version__ = "2.0.0b6"
|
4d89718d78517021daabf373f022c8d4d659b644bc13ad6f83e9973111b29e58 | Python | 249 | 11 | import datetime
def start_time():
return datetime.datetime.now()
def end_time():
return datetime.datetime.now()
def run_time(time_start, time_end):
print("Total running time is:")
print((time_end - time_start).seconds)
|
5b67887236914021ea82a8cff568eb601f48f1cba5285d57a9a1da7d8e807318 | Python | 249 | 7 | import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('deit3_base_patch16_224_fb_in22k_ft_in1k')
assert model.identifier == 'deit3_base_patch16_224_fb_in22k_ft_in1k'
|
654671ef923f105ca0e40e95bfb966b79de18a6acbbe6c908c024aa35fbd4d77 | Python | 249 | 10 | import dtiplayground.dmri.common as common
logger=common.logger
measure_time=common.measure_time
Color=common.Color
get_uuid=common.get_uuid
object_by_id=common.object_by_id
get_timestamp=common.get_timestamp
from .atlasbuilder import AtlasBuilder |
a6dda867216d980029ef4a9d77891abe69d82e84a313da4c71b5411a9d29b930 | Python | 249 | 9 | # Left empty as part of 2023 models migration
import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('effnetb1_272x240')
assert model.identifier == 'effnetb1_272x240' |
694b0daf5b44a1e5aa094912b97334b5011d51d84729a5236bfe75df0ba2ba51 | Python | 250 | 11 | from .parameter import (
Parameter,
SEQUENCE_TAGGER_PARAMETERS,
TRAINING_PARAMETERS,
DOCUMENT_EMBEDDING_PARAMETERS,
)
from .param_selection import (
SequenceTaggerParamSelector,
TextClassifierParamSelector,
SearchSpace,
)
|
876650750c312bddc290aa499d07c340f509cc33116268c3e8ae3e72955178c4 | Python | 250 | 8 | import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('convnext_tiny_imagenet1k_TA_HANDsum')
assert model.identifier == 'convnext_tiny_imagenet1k_TA_HANDsum'
|
e9dd3d2a6416a5e2bcf3a4ff942240f1317c071a7f5d49aa2c246f9ff0833ba7 | Python | 250 | 9 | """Command-line wrapper; run from any working directory."""
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
from openplant.rebuild import main
if __name__ == "__main__":
raise SystemExit(main())
|
7370f04ea4d5de25537f4b0a7061f12b6610c33477d926f4d5d7294903495b6d | Python | 251 | 9 | """Command-line wrapper; run from any working directory."""
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
from openplant.validate import main
if __name__ == "__main__":
raise SystemExit(main())
|
7f0f4a6bca137f6e0db2e1e0142768a71ee3346d9e28e1479566f466e14c8037 | Python | 251 | 6 | """Protocol builders: the sole construction sites for LangChain chat clients.
Each protocol module owns exactly one client class. Endpoints prepare fully
formed keyword arguments and hand them here; these builders add no
endpoint-specific logic.
"""
|
666acc2212c720ad42415e2eb5b6d73c798a15eebd8f0f616ef1b6bbeb5a6fa2 | Python | 252 | 7 | from pathlib import Path
BASE_DIR = Path(__file__).resolve().parents[3] # Root directory of the project
EMBEDDING_DIR = BASE_DIR / "PDB_db/embeddings"
DISK_DIR = Path("/disk18T3/Yitao/project_1")
FULL_EMBEDDING_DIR = DISK_DIR / "embeddings/protein"
|
e6f74ece10d83bf596fde8f5b5a872eb85912e1d73fc837ccbf0fe3306d39e63 | Python | 252 | 7 | from .checkpointer import Checkpointer
from .cumulator import Cumulator
from .utils import (get_data_root,
flatten_dict,
get_lr,
count_parameters)
from .load_tpc_wedges import load_tpc_wedges
|
2b004a131fe0a667e459fabd5d9ce04b1daf0dd0e9c2e6620845721545cd25d1 | Python | 253 | 7 | import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('convnext_base_fb_in1k_gram_aligned_dinov3')
assert model.identifier == 'convnext_base_fb_in1k_gram_aligned_dinov3'
|
8e045d52f65c37196758957f2e154194069d00769253bb400afbe04251de87e8 | Python | 253 | 11 | """
Tools for masking out specific sites in aligments by various criteria, for
example masking CpG sites or sites with low sequence quality.
"""
from bx.align.sitemask.core import (
Masker,
MaskPipeline,
)
__all__ = ["MaskPipeline", "Masker"]
|
168446f54728f2a27bf5b3a098c0fa87c31e4e03c63f4bdafa7c715a83caf612 | Python | 254 | 12 | import numpy as np
def calc_kappa (length,delta):
return (pow(length,4)-pow(delta,4)) / (12.0*pow(length,2))
def main ():
cell_length = 20.0
delta = 30.0
print("Kappa = %.10lf" % (calc_kappa(cell_length,delta)))
if __name__ == "__main__":
main()
|
0826601f641a5e4c675215b27c187418b8913a4076ed7d4b69385fd52ce02b18 | Python | 255 | 8 | import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('effnetb1_cutmix_augmix_sam_e1_5avg_424x377')
assert model.identifier == 'effnetb1_cutmix_augmix_sam_e1_5avg_424x377' |
0fb8672da94c46b7d6a349d4d60888cdb1053aabc4c55a57e4913d1acb39d3d6 | Python | 255 | 11 | from django.apps import apps
if apps.is_installed("silk"):
from silk.profiling.profiler import silk_profile # pylint: disable=unused-import
else:
def silk_profile(name=None):
def profile(f):
return f
return profile
|
33f5934158249376c96fc04c2e1a9d7b12c4c477cd446c485a28a0315c185dfe | Python | 256 | 8 | import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('convnext_tiny_imagenet1K_torchvisionV1')
assert model.identifier == 'convnext_tiny_imagenet1K_torchvisionV1'
|
5af3c1007d3e6576a55c94308156d3726d0b1ce0f3b8689f084df10f3fc7025f | Python | 256 | 8 | import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('convnext_tiny_imagenet1k_APGD_HANDmean')
assert model.identifier == 'convnext_tiny_imagenet1k_APGD_HANDmean'
|
005703bca01547e13605963f1a8a2b94a2e8dbf55ba696910359a2578e5e04a8 | Python | 257 | 7 | __title__ = 'CellDetection'
__version__ = '0.4.9'
__author__ = 'Eric Upschulte'
__email__ = 'e.upschulte@fz-juelich.de'
__license__ = 'Apache License, Version 2.0'
__summary__ = 'Cell Detection with PyTorch.'
__url__ = __uri__ = 'https://celldetection.org'
|
18846c2d847e913e09271ee5878659005181663d1a79ba24b94d00ec96e30d50 | Python | 257 | 7 | # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
from .predict import DetectionPredictor
from .train import DetectionTrainer
from .val import DetectionValidator
__all__ = "DetectionPredictor", "DetectionTrainer", "DetectionValidator"
|
f5f64a5f9ff3531d74a32427ef871dac652d05f2cfd3955cae51ea2ab8d45c31 | Python | 257 | 17 | from .sfcn import (
SFCN,
BinarySFCN,
CategoricalSFCN,
MultiTaskSFCN,
RegressionSFCN,
sfcn_factory,
)
__all__ = [
'SFCN',
'BinarySFCN',
'CategoricalSFCN',
'MultiTaskSFCN',
'RegressionSFCN',
'sfcn_factory',
]
|
0d306f2de7f45d1f3fd18c2bf8c2d8066544955a2cee66761360199e2920a96b | Python | 258 | 9 | import torch
import torch.nn as nn
import numpy as np
def Cifar100_fine2coarse(labels):
class_interval = 5
coarse_label = labels/class_interval
coarse_labels = torch.tensor(coarse_label.floor(), dtype=torch.long)
return coarse_labels |
b44583abf1137cc9b2252419dbb522aa66b053ba5ebbe4f099845c260ee612f3 | Python | 258 | 12 | from .evaluate import Evaluator
from .dataset import NodePropPredDataset
try:
from .dataset_pyg import PygNodePropPredDataset
except ImportError:
pass
try:
from .dataset_dgl import DglNodePropPredDataset
except (ImportError, OSError):
pass
|
c6bc3214a7f78319162bb19b832c206e5e8bcd24b7fa265c6fdd073074c03497 | Python | 258 | 8 | import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('Zejin_Lu_dvd_baseline_imagenet_resnet50')
assert model.identifier == 'Zejin_Lu_dvd_baseline_imagenet_resnet50'
|
e8815da201f10e360fab980e556f8b097d7c4fef229872ef9404423a54fd7e6d | Python | 258 | 12 | from .evaluate import Evaluator
from .dataset import LinkPropPredDataset
try:
from .dataset_pyg import PygLinkPropPredDataset
except ImportError:
pass
try:
from .dataset_dgl import DglLinkPropPredDataset
except (ImportError, OSError):
pass
|
023c07a294c50de7b6c8df085a3b3993c096a1713f6913b323b35ecbb27c4516 | Python | 259 | 8 | import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('cvt_cvt-21-384-in22k_finetuned-in1k_4_LucyV4')
assert model.identifier == 'cvt_cvt-21-384-in22k_finetuned-in1k_4_LucyV4' |
02db6b384e444643bb58b23e91f15ba1603ec47f2fb391050cdafe9b6e07abd6 | Python | 259 | 9 | from tests.utils import pytest_importorskip
def test_qt3dlogic():
"""Test the qtpy.Qt3DLogic namespace"""
Qt3DLogic = pytest_importorskip("qtpy.Qt3DLogic")
assert Qt3DLogic.QLogicAspect is not None
assert Qt3DLogic.QFrameAction is not None
|
a9443c2680725378143f6a0a7d98ed103f2a71a5dd58349b697d082ec737eb97 | Python | 259 | 8 | import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('cvt_cvt-13-384-in22k_finetuned-in1k_4_LucyV4')
assert model.identifier == 'cvt_cvt-13-384-in22k_finetuned-in1k_4_LucyV4' |
d95dac35deae98dc551072bb7da0838de815f5e207d3ba67de2b41113def7e55 | Python | 259 | 11 | from setuptools import find_packages, setup
REQUIREMENTS = [i.strip() for i in open("requirements.txt").readlines()]
setup(
name="src",
packages=find_packages(),
version="0.1.0",
python_requires=">=3.11",
install_requires=REQUIREMENTS
)
|
dcb75032f9851e6d87c80b31520c2f517574951abba85cd6fa19b0814018586c | Python | 260 | 9 | from importlib.metadata import PackageNotFoundError, version
try:
__version__ = version("pydesigner-dwi")
except PackageNotFoundError:
try:
__version__ = version("pydesigner")
except PackageNotFoundError:
__version__ = "0+unknown"
|
757141ab32f9219acf3bedd8fc6a848e3fc6472f42a756c85ebef2152c21e616 | Python | 261 | 10 | import pytest
from brainscore_vision import load_stimulus_set
@pytest.mark.private_access
def test_num_elements():
stimulus_set = load_stimulus_set('BarbuMayo2019')
assert len(stimulus_set) == 17261
assert len(set(stimulus_set['synset'])) == 104
|
8a3690a59d8d598e57a7d71120b705be5e8d67b336ad6ec70d2c970aa04d81e9 | Python | 261 | 9 | import pytest
from brainscore_vision import load_stimulus_set
@pytest.mark.private_access
def test_num_elements():
stimulus_set = load_stimulus_set('imagenet_val')
assert len(stimulus_set) == 50_000
assert len(set(stimulus_set['label'])) == 1_000
|
9abd1e3fd40867d30cbfa23eb9754e2de0f3d4954465008497f77f98215311b0 | Python | 261 | 8 | from io import BufferedIOBase, BufferedReader
from pathlib import Path
from typing import BinaryIO, Union
# IO Types
PathLike = Union[str, Path]
BufferLike: object = Union[bytes, BinaryIO, BufferedIOBase, BufferedReader]
FileLike = Union[PathLike, BufferLike]
|
0cae1866dafff789663416f55ac9bcf1a26652f802314e15d23bb79c5f060860 | Python | 262 | 12 | import os
import nibabel as nib
from pytest import fixture
test_path = os.path.dirname(os.path.abspath(__file__))
data_path = os.path.join(test_path, 'fixtures')
@fixture
def nifti_image():
return nib.load(os.path.join(data_path, 'raw', 'esten.nii.gz'))
|
605d4d69288bbe9b3278f939a17f1ff36ecf5fb24809d46242b530cf376f951e | Python | 262 | 8 | # -*- coding: utf-8 -*-
"""This sub-package provides tools for the visualization of the alignment and
analysis results
"""
#:copyright: Copyright 2015 by Christoph Kirst, The Rockefeller University, New York City
#:license: GNU, see LICENSE.txt for details.
|
b83473721050410a35db36672527a71c9e729dd1c3529cd1f3674032b2c7b5ba | Python | 262 | 11 | from skbuild import setup
from setuptools import find_packages
setup(
name='tomocupy_stream',
version=open('VERSION').read().strip(),
author='Viktor Nikitin',
package_dir={"": "src"},
packages=find_packages('src'),
zip_safe=False,
)
|
11c385a78fe514f594e8c1ae7680cb0f12b9cfb605e2f0cfd96c4d772e058867 | Python | 263 | 7 | # Copyright (C) CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
from cvat.utils.django_database.contextmanagers import * # noqa: F403
from cvat.utils.django_database.types import * # noqa: F403
from cvat.utils.django_database.utils import * # noqa: F403
|
5a5899b740413ff03057fc0e6981106780fd477fd235658f607e89eaeb32f0fe | Python | 263 | 11 | """
BCE Model Module
This module contains various neural network models for B-cell epitope prediction.
"""
# from .ReCEP import ReCEP
# from .EGNN import EGNNLayer
# from .dihedral import DihedralFeatures
# __all__ = ['ReCEP', 'EGNNLayer', 'DihedralFeatures'] |
640d79b2f4f04b929814774f4cdacc50bb11ced8d64679030321fc5182634012 | Python | 263 | 9 | # Left empty as part of 2023 models migration
import pytest
import brainscore_vision
@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('AdvProp_efficientnet-b6')
assert model.identifier == 'AdvProp_efficientnet-b6' |
cf4322abb908f69282198931fb23c09a1ef1101b066d57842402e6436a92eaa3 | Python | 263 | 7 | from .aliked import ALIKED # noqa
from .disk import DISK # noqa
from .dog_hardnet import DoGHardNet # noqa
from .lightglue import LightGlue # noqa
from .sift import SIFT # noqa
from .superpoint import SuperPoint # noqa
from .utils import match_pair # noqa
|
bed33d34e3b82cb44d54bd30cfdc43f886f7410967744b331c6055435c6de3f7 | Python | 264 | 7 | from PyInstaller.utils.hooks import collect_dynamic_libs
hiddenimports = [
"sklearn.metrics._pairwise_distances_reduction._datasets_pair",
"sklearn.metrics._pairwise_distances_reduction._middle_term_computer",
]
binaries = collect_dynamic_libs("sklearn")
|
97dda2dd3ae507b9af8a46d4da1776a7c2db3a458ab3d5efee3a5e0ad224e390 | Python | 266 | 9 | from sharpy_track.view.RegistrationViewer import RegistrationViewer
import sys
from qtpy.QtWidgets import QApplication
if __name__ == "__main__":
app = QApplication(sys.argv)
RegViewer = RegistrationViewer(app)
RegViewer.show()
sys.exit(app.exec())
|
d21f1bd4260c76453208819c97dec0e395ed47f596e00f148f3b56da9ec59fbf | Python | 266 | 7 | import os
from util.config_vars import config
from step3_2_manual_labeling.step3_2_manual_label_tk import ManualImageEvaluator
def main():
csv_name = os.path.join(config.paths.csv.step3, "final_revision_data_groundtruth.csv")
ManualImageEvaluator(csv_name)
|
3cd1e518a9548dda675bc5fd2b7b523fe6f0a48468e7ee450f6a1f42dab37377 | Python | 267 | 10 | from .ann_pemfc import PEMFC_ANN, PEMFC_ANN_Trainer
from .epcdnn_vrfb import VRFB_ePCDNN, ePCDNN_VRFB_Trainer, PhysicsConstrainedLoss
__all__ = [
'PEMFC_ANN',
'PEMFC_ANN_Trainer',
'VRFB_ePCDNN',
'ePCDNN_VRFB_Trainer',
'PhysicsConstrainedLoss',
]
|
919dca6f4d475ba350104fa7b481f7a33dfdffdd7d89b2615292e61e7784324d | Python | 267 | 9 | from sharpy_track.view.RegistrationViewer import RegistrationViewer
import sys
from PyQt5.QtWidgets import QApplication
if __name__ == "__main__":
app = QApplication(sys.argv)
RegViewer = RegistrationViewer(app)
RegViewer.show()
sys.exit(app.exec_()) |
98aaf7361b97e7c3c0f66592f4f465f56a9dc00d4f10f03da13bb928257623e4 | Python | 267 | 13 | import gc
import spotd.main_code_sec1 as spotae
def train_model(cell_key):
print("-------------S^2POTAE Model Training-----------------")
spotae.main(cell_key)
if __name__ == '__main__':
cell_key = 'cell_type'
train_model( cell_key)
|
b3ffce40239b547bf75c364e83dfeba9009a6ff9c88b415fc3699a40024753e2 | Python | 267 | 8 | from argclz.commands import parse_command_args
from .main_tactile_summary import TactileSummaryOptions
parse_command_args(
usage='python -m rscvp.behavioral CMD ...',
description='Analysis of behavioral results',
parsers=dict(bs=TactileSummaryOptions)
)
|
e78f92398f53c8355497bb717255e8655469a263ff2c1240b10b5ab7cc2f16a6 | Python | 267 | 10 | # Copyright (C) CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
def to_cvat_mask(box: list, mask):
xtl, ytl, xbr, ybr = box
flattened = mask[ytl : ybr + 1, xtl : xbr + 1].flat[:].tolist()
flattened.extend([xtl, ytl, xbr, ybr])
return flattened
|
693e05bbe59824b4792bc3b991a4738528702523d725e871aa5d895219178cfa | Python | 268 | 11 | from pathlib import Path
import numpy as np
path = Path(__file__).parent
directory = str(path)
layouts = path / "layouts"
ctf275_channel_names = np.load(path / "ctf275_channel_names.npy")
neuromag306_channel_names = np.load(path / "neuromag306_channel_names.npy")
|
d30fc4a1389bf83baf03cc35d755c94d75b2a293487fa71f752974b18c13b275 | Python | 269 | 10 | from skeleton_keys.hist_tasks import create_layer_histograms
from skeleton_keys.tasks import *
from taskqueue import TaskQueue
import sys
queue = sys.argv[1]
timeout = int(sys.argv[2])
with TaskQueue(qurl=queue, n_threads=0) as tq:
tq.poll(lease_seconds=timeout)
|
e264c0817e81a5f0de254eea32e151c3163f84cc82cd81f6e4337edfb94c9e80 | Python | 269 | 7 | from .DropConfig import DropConfig
from .SampleAnnotation import SampleAnnotation
from .submodules.MonoallelicExpression import MAE
from .submodules.AberrantSplicing import AS
from .submodules.AberrantExpression import AE
from .submodules.RNAVariantCalling import RVC
|
f968bbe03a6f145797238451d9ccf682971958ee36acb3762ea0262badbceebc | Python | 269 | 12 | from sklearn.base import BaseEstimator, TransformerMixin
class IdentityTransformer(BaseEstimator, TransformerMixin):
def fit(self, X, y=None):
return self
def transform(self, X):
return X
def inverse_transform(self, X):
return X
|
6defe81cea7126d3f7316ad58ce0fb3e505ad4c37222e62ddc322b2a2a33e6c3 | Python | 270 | 7 | import os
import ClearMap.Settings as settings
filename = os.path.join(settings.ClearMapPath, 'Test/Data/ImageAnalysis/cfos-substack.tif');
import ClearMap.Visualization.Plot as plt
import ClearMap.IO as io
data = io.readData(filename, z = (0,26));
plt.plotTiling(data); |
7e382f38b119c85cff2399b948d3ede454f8db0a9f9c9b9c34dd55f54d5a955a | Python | 270 | 5 | from builder.models.src.transformer.attention import *
from builder.models.src.transformer.decoder import *
from builder.models.src.transformer.encoder import *
from builder.models.src.transformer.module import *
from builder.models.src.transformer.transformer import *
|
82b3cd24771caa611e541612cb2fb45cb59fdd4b49818e50df164cce353435a8 | Python | 271 | 8 | import pandas as pd
def clip_negative_first_row(df: pd.DataFrame) -> pd.DataFrame:
"""Return a copy with negative values in the first row clipped to zero."""
clipped_df = df.copy()
clipped_df.iloc[0] = clipped_df.iloc[0].clip(lower=0)
return clipped_df
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.