sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
2630424fd628d1acdea8fe201d342d43871f1dc0162d40407a1013598061b914 | Python | 152 | 5 | import torch
from torch.nn.functional import softmax
def rmse(outputs, target):
return torch.sqrt(torch.mean((softmax(outputs, dim=0)-target)**2))
|
37d737504f0b630d09f0fa4139f87922c38cdbd175f780e56e2c8b170737d34b | Python | 152 | 3 | """
This module contains Spitfire's analytical Jacobian and numerical methods 'engine' named griffon, which is written in C++ and wrapped by Cython
"""
|
40217b30102fb6b56a300526633a394ab961ba9136909fa3a28b3eda5d5c8540 | Python | 152 | 10 | import torch
from torch.nn import functional
def softmax(x):
return functional.softmax(x, dim=-1)
def swish(x):
return x * torch.sigmoid(x)
|
6984e737a0f4fa0c422b7063cda95667dbf6f23c41a15a045c856211656021e2 | Python | 153 | 6 | from .config import Config
from .engine import Engine
from .store import Store
from . import metrics
__all__ = ["Config", "Engine", "Store", "metrics"]
|
3664efb76b851d8d81fd1c3b5ffc62dce48eb9e867e2d787e66f8a81592447cb | Python | 154 | 5 | import timm
def load_pretrained_encoder(model_name="resnet18", num_classes=2):
return timm.create_model(model_name, pretrained=True, num_classes=2)
|
96d7644ae7f472a9992c8938e5f545a3bddcd590ab91503fc18d5dc109bac31b | Python | 154 | 5 | from .spatials import clustering
from .spatials import smooth
from .spatials import trajectory
from .spatials import morphology
from .spatials import SME
|
4c585318e9e80f6d1c002397102e97295c1a3e98aecb3c98eb2552ff01126b06 | Python | 155 | 10 | # ruff: noqa: F401
from ._json import (
to_json,
write_json,
from_json,
read_json,
config,
to_json_plotly,
from_json_plotly,
)
|
67cf6b614582bc98143bc8af07ef581a45e823fb1fa5f5e72fee0ee59140650a | Python | 155 | 4 | from .data_split import DataSplit
from .molecule_split import MoleculeSplit
from .random_split import RandomSplit
from .scaffold_split import ScaffoldSplit |
8adc8c61f5d7cd630907c2cf648f5441d1bcdb77a34c584aab1c005c3699e43c | Python | 155 | 9 | import json
def test_info(client):
response = client.get('/api/info/')
data = json.loads(response.data)
assert data.get("git") is not None
|
b5b49815e430c538d04d54c1e583fefb70a1ba82a7eec866174000d74cb872a9 | Python | 155 | 5 | from pycobi import ODESystem
a = ODESystem.from_yaml("model_templates.neural_mass_models.qif.qif",
auto_dir="", init_cont=False)
|
d40333c4467e2bf42f79c9d6f1d6e89ca8201745c6d2c6490c49375885a91ae9 | Python | 155 | 5 | from .decide_split import *
from .visualize_split import *
from .tuning import *
from .reversal_detector import *
from .cosine_distance_clustering import * |
5bcd03f530e5568e83dd77c113a20aa0aa5ce2252dd1f026a295271471f61b70 | Python | 157 | 7 | import sys
try:
from data_loader import *
except:
sys.path.append('/workspace/Walk_Video_PyTorch/project/dataloader')
from data_loader import * |
189702a2aec48169f5470d4fc38cd3dcb7f5898096adbe757eaa467ee4f96e13 | Python | 158 | 12 | from celery import Celery
app = Celery('tasks', broker='amqp://')
@app.task()
def add(x, y):
return x + y
if __name__ == '__main__':
app.start()
|
271d5083b9b22fba42de038712d150d1122cc73b294e1886fe62c9988acfe76f | Python | 159 | 2 | graphlan_annotate.py --annot Annotation_File_RCLR_and_Colour_updated_V4.txt Data.txt plotfile.xml
graphlan.py plotfile.xml Figure_3_V4.png --dpi 300 --size 15
|
3834e310be335d6d641eec4dffb38e47899bc5f29ab3ce3ef3a75b3a1bcb6f01 | Python | 159 | 6 | """Metrics sub-module."""
from .metric import Metric
# Link in report function to list available metrics
from specparam.reports.options import check_metrics
|
4ad8b5beef4ddee3c1f08a447011fa5af8e0e980a630fe03f8844b4ca4977b92 | Python | 159 | 2 | from scene_graph_prediction.pointnet2_dir.pointnet2 import data, models, utils
from scene_graph_prediction.pointnet2_dir.pointnet2._version import __version__
|
93549d64d4d369db2c9000d3942627a3e63d5eec7c85b1fabda67ef1110c170a | Python | 159 | 10 | """
BdPy preprocessing package
This package is a part of BdPy
"""
from .interface import *
from .select_top import *
from .preprocessor import Preprocessor
|
8830c57f152fb0435438fd3e3762932bdd695e46e47ad78d955810250fabbfd0 | Python | 160 | 10 | from prodict import Prodict
cols = Prodict(
SLD=["TIME", "SLD"],
)
title_dict = Prodict(train="Training", test="Test")
TIME_PAD_VALUE = -5
PAD_VALUE = 0
|
a035b565372486a24377678a5d0059846ade7faa1ac1461ace125bfc40eb6522 | Python | 162 | 3 | from src.datasets.pvc1 import SinglePVC1Dataset, MultiPVC1Dataset
from src.datasets.cadena import CadenaDataset
from src.datasets.pca import PCBuilder, PCDataset
|
6967db902498973dd3ff93583476607a72ba68b8bac19e4c159580f50b2176d9 | Python | 163 | 5 | from .af import AFLayerProbe
from .base import LayerProbeBase
from .linear import LinearLayerProbe
from .lstm import LSTMLayerProbe
from .rnn import RNNLayerProbe
|
e35ebb20f42a6d82a0e41dcda470fffa1908648dd208120bdcc9ece19f09346a | Python | 164 | 5 | """gui_v2 GUI helpers package.
This package starts intentionally small. Legacy helpers should be copied or adapted
only when they are needed by the new shell.
"""
|
fed56a7b5c930e65fd95ce4f867e6d1ac727fb1fd508833612217462a9abb16d | Python | 164 | 8 | from torch import nn
class Identity(nn.Module):
def __init__(self):
super(Identity, self).__init__()
def forward(self, x, *args):
return x |
f90a3fe23d243680bd67b54695facad315a2afed66810c9e9e286eb204537309 | Python | 165 | 8 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.apps import AppConfig
class BiomedisaAppConfig(AppConfig):
name = 'biomedisa_app'
|
fb93fd551451731b21e74e2577b5777ed0e38b27bcb7f04677feb39912e1aebc | Python | 165 | 11 | from abc import ABC, abstractmethod
class Strategy(ABC):
def __init__(self, similar_map_path):
pass
@abstractmethod
def find_similars(self, drug_id):
pass |
3a1b09cf94c5ccd6b97a510a88c57f5beffe7f077ac1c382d01a972fe125a1e8 | Python | 166 | 6 | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
from slowfast.utils.env import setup_environment
setup_environment()
|
860b607982314a477537a754ec2b7e852aae0f3b4591b2937168e1d8e6069245 | Python | 166 | 8 | import os
os.environ["PYQTGRAPH_QT_LIB"] = "PyQt6"
# flake8: noqa: F401
from . import geometry
from . import structure
from ._version import version as __version__
|
6d32a0469b42f5ec39353e449da77dffd19bf7894920beb6904e3dfa9184ce33 | Python | 167 | 16 | from .celery import app
@app.task
def add(x, y):
return x + y
@app.task
def mul(x, y):
return x * y
@app.task
def xsum(numbers):
return sum(numbers)
|
a45c557a4e329038ae002e3dcbfdf2c343425b88792ef0398fb27891e128e7c3 | Python | 167 | 4 | from .version import __version__
from .nv_input import input_parser, gzip_check
from .nv_valid import fastx_valid, bed_valid
from .nv_align import check_exe, align_mm
|
1e35e2399f9d61a39e72f81bc0542c4dd452534c08d6078c75a8fb969d767aac | Python | 168 | 9 | from .annotate import annotate_interactive
from .kmeans import kmeans
from .leiden import leiden
__all__ = [
"annotate_interactive",
"kmeans",
"leiden",
]
|
6b8ae98b31c8f6dac739d3d4ca5e59c8cee6e09b095b7fc149e1c28388651fcb | Python | 168 | 5 | from pathlib import Path
from typing import TypeAlias
PathLike: TypeAlias = str | Path
"""A file-system path accepted as either a plain string or a `pathlib.Path`."""
|
8abdee68e2386082f060c6bfb75994aea04f66fce696aec1aec431a464f89c6e | Python | 168 | 5 | #from acdc_nn.cmd import main
#from acdc_nn import nn
from acdc_nn import nn
from acdc_nn import util
from acdc_nn.acdc_nn import ACDC3D, ACDCSeq, load_prot, run_tests
|
b997ce9bc9588970e2d5eebc8cb17b4c8f48145763d644b556a253b41ff23054 | Python | 168 | 8 | from setuptools import setup
from Cython.Build import cythonize
setup(
ext_modules=cythonize('cyutils.pyx')
)
# Compile using python setup.py build_ext --inplace
|
d0b220dbc7a0a2ae9e1d59eb772e913219dd227efa59660f6d2fe86d49cc1bc2 | Python | 168 | 8 | """ Runs the web server
"""
from os import sched_getaffinity
from . import application
application.run(host='0.0.0.0', port=8080, workers=len(sched_getaffinity(0)))
|
3a93cd69f200848e8ffef6b2abdaa5803fb5044981ab64297f8c7d6541820570 | Python | 169 | 13 | from flask import Flask
def create_app():
return Flask("app")
def create_app2(foo, bar):
return Flask("_".join(["app2", foo, bar]))
def no_app():
pass
|
8af1a7ebc25045bd17520dff463d4863d0a6b7531e610e0e4f0c733339195391 | Python | 169 | 8 | import numpy as np
import os
def signal_preprocess(signal):
signal = np.array(signal)
signal = (signal - np.average(signal)) / np.var(signal)
return signal |
a89adcba2ba139b8f5615a8ad6fab17c5b7d9bf9be64e42d5c899acf4a55559b | Python | 169 | 9 | from setuptools import setup
setup(
name='DTox',
author='Yun Hao',
version='0.0.1',
description='Deep learning for Toxicology',
packages=['DTox']
)
|
ef17b7c614cd421956dc92ed0410d4df358cbb79dbfa11eb0321c75c4f66fd21 | Python | 169 | 7 | from typing import Tuple, Union
import numpy
from angorapy.common.senses import Sensation
StepTuple = Tuple[Sensation, Union[float, numpy.ndarray], bool, bool, dict]
|
6a87d3659d72f69623560cea4b016e4d0c460b8329fe08fe8d686da2d806f8bc | Python | 170 | 9 | import numpy as np
from . import baselines
from . import renishaw as rshaw
from . import wavelets
from . import images
#test_data = np.loadtxt('../test-spectrum.txt')
|
fb47287518607fc934d6b3515b77cefbdb214d9be879d67c09e5fe99bb1f5992 | Python | 170 | 5 | # -*- coding: utf-8 -*-
# Copyright (c) 2016-2018 Braintech Sp. z o.o. [Ltd.] <http://www.braintech.pl>
# All rights reserved.
"""Package providing Wii Read Manager."""
|
fd0c825977e878f6ce69a44a631373b25ef4d618f87a9afbacf361a696bb18a5 | Python | 170 | 3 | from .mua_spike_extractor import (extract_mua_spikes)
from .spike_features import (return_mfr, return_responding_channels)
from .networkevents import (return_mua_network) |
be3f9c28fa09dd6fb215ff71549bbfb4396e30da79baa9f01eb6c49fd0898151 | Python | 171 | 6 | # -*- coding: utf-8 -*-
# @Author : Yue Liu
# @Email : yueliu19990731@163.com
# @Time : 2022/9/21 20:58
from .random_seed import setup_seed
__all__ = ['setup_seed']
|
f741609adfb00e5c2cfe0e63b39ab62ffa71996216f32331e980e5d73562ba8b | Python | 172 | 11 | __author__ = 'quentin'
import unittest
class TestExple(unittest.TestCase):
def test_exple(self):
ans = 1
ref = 1
self.assertEqual(ans, ref)
|
6e11e741fbd9a4d667c2d213507913fb042dd60864ef725037228461fe0d339e | Python | 174 | 6 | # pylint: disable=wildcard-import
"""
Customized data loader for video classification related tasks.
"""
from __future__ import absolute_import
from .classification import *
|
b18be6f53de6ad58e9f7362bbc5430b2e2e1a13b8afb9abb6f07e91b754f1d08 | Python | 174 | 5 | # This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery import app as celery_app
__all__ = ('celery_app',)
|
d4e986b299e8277d7b9db5d775d2b6910d372db2410204ab4c81fbd386017683 | Python | 174 | 6 | """Algorithms sub-module."""
from .algorithm import Algorithm
# Link in report function to list available algorithms
from specparam.reports.options import check_algorithms
|
04e2f458c686c3de37e337b71d1962c343ae1e4054ead24b21c9318ea8d8ed36 | Python | 175 | 10 | from biss.dummy import dummy_world
def test_dummy() -> None:
# given
expected = "dummy"
# when
dummy = dummy_world()
# then
assert expected == dummy
|
199874656b2ccf2ca63f0325e303d7f95f177e48ff069f495aec24ed7d8628f8 | Python | 175 | 5 | from .metadata import Metadata
from .loader import LoadChannels
from .loader import LoadMUASpikes
from .mua_spikes import MUASpikeManager
from .ca_spikes import CaSpikeManager |
415ca139b46fb2180bffefcdd5e38b6f269e78b0a9074a25d94a3b9275231dad | Python | 175 | 7 | parameterNames = {
'QCDscale_Higgs_ggH': 'QCD scale ggF inclusive',
'QCDscale_Higgs_ggH2in': 'QCD scale ggF #geq 2 jets',
'ATLAS_LUMI_2012': 'luminosity',
'sys':'sys',
}
|
703679c10ed3d2bdf726c8f6e4e596c241228e7dbdc8e89ed990be9b0b894354 | Python | 175 | 6 | # -*- coding: utf-8 -*-
# @Author: gviejo
# @Date: 2022-01-17 17:22:19
# @Last Modified by: gviejo
# @Last Modified time: 2022-01-17 17:22:55
from .eeg_processing import * |
f0b1bae98cae5058b5fc66e581a6f279960364f309f4855c38f311bd395c4cb0 | Python | 175 | 7 | import sys
import os
path = os.path.abspath(os.path.join(os.path.dirname(__file__), '../densratio/'))
sys.path.insert(0, path)
from densratio import densratio
import helpers
|
71aba2e83d715ea14186c281ec1d29c4907e3d55ae96fb948829d09d794a931f | Python | 176 | 5 | # pylint: disable=wildcard-import
"""Object Tracking, Visual Tracker Benchmark
http://www.visual-tracking.net"""
from __future__ import absolute_import
from .tracking import *
|
cd235365946b6feaa2d35c13dcc4a3f46407723a0449ae191880a958961e6b4a | Python | 176 | 6 | """Top-level package for stringdb. Imports the api module"""
from .api import *
__author__ = """Peter C DeWeirdt"""
__email__ = 'petedeweirdt@gmail.com'
__version__ = '0.1.5'
|
d40a227c1a4b75f46ca9c36bbc3930ec96f6747e8ceb4fec72699210e65fab8f | Python | 176 | 6 | # -*- coding: utf-8 -*-
# @Author: gviejo
# @Date: 2022-01-17 13:50:29
# @Last Modified by: gviejo
# @Last Modified time: 2022-01-17 13:50:48
from .neural_ensemble import * |
43fdf361ef33793845ed9a7a48f810d0ae089e8127203263632f7e60c24f95a2 | Python | 177 | 6 | # pylint: disable=wildcard-import
"""Single-shot Object Detection."""
from __future__ import absolute_import
from .ssd import *
from .presets import *
from .vgg_atrous import *
|
84c3e74c9b03f7e3972f7e59641c9367c51c70241cf40c9efe012b962c1e8688 | Python | 177 | 9 | import abc
from carbonserver.api import schemas
class Runs(abc.ABC):
@abc.abstractmethod
def add_run(self, run: schemas.RunCreate):
raise NotImplementedError
|
05747021ce7835eb1662cfa04bf658677aef8e72d1cab6782a88b9ef1800f488 | Python | 178 | 5 | # -*- coding: utf-8 -*-
# Copyright (c) 2016-2018 Braintech Sp. z o.o. [Ltd.] <http://www.braintech.pl>
# All rights reserved.
"""Package managing tag and proving tag proxy."""
|
e8ba3e9edef2e7fd6c1c0be76eba06d4cdfa0f49d428ad76e62c59668ca66174 | Python | 178 | 7 | from .monomers import Monomer
from .polyestimator import PolyEstimator
from .polymaker import PolyMaker
from . import _version
__version__ = _version.get_versions()["version"]
|
c5bd3792f07dc40437777892df71ef78536978c9c434429e4893b552405f22cf | Python | 179 | 10 | """
Boilerplate dev test
"""
from imports import *
if __name__ == "__main__":
abf = pyabf.ABF(PATH_DATA+"/180415_aaron_temp.abf")
print(abf.sweepY)
print(abf.sweepC) |
17e1e4c0cf88dc3442f5f8cfc82c505827f51ee642df5893e309083ea787d326 | Python | 180 | 3 | from ._activations import get_activators_n_seqlets, get_activators_max_seqlets, get_pfms
from ._plot import plot_filter_logo, plot_filter_logos
from ._annotate import annotate_pfms |
50cba342efe34a001136271c441a7da5a3f58edeba79358825041d305ea7db64 | Python | 180 | 5 | from .caper_client import CaperClient, CaperClientSubmit
from .caper_runner import CaperRunner
__all__ = ['CaperClient', 'CaperClientSubmit', 'CaperRunner']
__version__ = '2.3.2'
|
b7cd1e4fd287d8f9c966581fddc480c9bfba61f594117e688a4670c018d29264 | Python | 180 | 6 | """
Customized data loader for video classification related tasks.
"""
from __future__ import absolute_import
from .dataset_classification import *
from .multigrid_helper import *
|
c4ac945d4b858aa9f0315a424846f5e5d30b86ac879f061e1c96cce522ccb3a4 | Python | 180 | 3 | from .voxel_mapping import innervation_location, innervation_image, coordinates_to_image
from .flatmap_wrapper import GeneralMap, Flatmap, BarycentricMap
from .barycentric import * |
5484c7758ea70d98b48e6b103761cc1643d5ede81bacb2ea6e52e01677e898cc | Python | 181 | 7 | from . import data_augmentation
from . import utils
from . import training
from . import models
from . import dataset
from . import pycv_link
from . import committor_regularisation
|
3560333d8e2514afd78edb6c92169a1bd9d7bf5fb62a74aaed6827266a1833ea | Python | 182 | 7 | """
Utilities for converting graphs into sets of tensors for machine learning models
"""
from .crystal_preprocessor import *
from .mol_preprocessor import *
from .tfrecord import *
|
00d9ead7dfef7635332141fb788bde29b575360c523191cbc2d1bc90d2b1bebc | Python | 183 | 4 | import os
# please refer to the readme on where to get the parameters. Save them in this folder:
folder_with_parameter_files = os.path.join(os.path.expanduser('~'), 'hd-bet_params')
|
8ef6c8087eedb7072dad327ae9e7d4cc0882a485badf9ab1a1e0583d0088ef98 | Python | 183 | 10 | from mongoengine import *
class LicenseModel(DynamicDocument):
id = SequenceField(primary_key=True)
name = StringField()
url = StringField()
__all__ = ["LicenseModel"] |
951a19ce2066436c967caf9bac3d50c5235b1570e01c27cc0975671948f676ba | Python | 183 | 8 | from ._gpu_tree import GPUTreeExplainer
try:
from ._version import version as __version__
except ImportError:
__version__ = "0.0.0-not-built"
__all__ = ["GPUTreeExplainer"]
|
a943a216339233448f0c381ab84ec5e2d63224d3d7c5d1ca8069b951463fcb2f | Python | 183 | 7 | import os
import sys
extensions = ['sphinx.ext.autodoc', 'celery.contrib.sphinx']
autodoc_default_flags = ['members']
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
|
3a74a37d75492620177a035b2c2d90d60b346ac511a1710ec487a479359fef99 | Python | 184 | 3 | from .mua_plots import (rasterplot, opto_rasterplot, rasterplot_inlet, rasterplot_drugs)
from .figure_plots import (plot_pairs, plot_pairs_drugapp)
from .ca_plots import (plot_catrace) |
83f72977f90545fe229e2e588eb3bada11d8cb52ec365e02add4f7f7555f3fbd | Python | 184 | 14 | class ConfigurationError(Exception):
pass
class PreprocessingError(Exception):
pass
class PlottingError(Exception):
pass
class SegmentationError(Exception):
pass
|
9ccef6a7b3f264cc8a7f918c6f37a7c959c90078c67d052d9be06e2f9beaabb0 | Python | 184 | 5 | # -*- coding: utf-8 -*-
# Copyright (c) 2016-2018 Braintech Sp. z o.o. [Ltd.] <http://www.braintech.pl>
# All rights reserved.
"""Package providing proxy for signal data and info."""
|
d478f5101817ca42b343c7f266a473cec59731d4f3024f1eb384b1ad16c3c516 | Python | 184 | 4 | import os
# please refer to the readme on where to get the parameters. Save them in this folder:
folder_with_parameter_files = os.path.join(os.path.expanduser('~'), 'hd_glio_params')
|
66a80c300feb126803dd22896bfd6bf654ae51f055340662d5f97317e29738fe | Python | 185 | 5 | from .config import nap_config
from .interval_set import IntervalSet
from .time_index import TsIndex
from .time_series import Ts, Tsd, TsdFrame, TsdTensor
from .ts_group import TsGroup
|
c51e354d3b49be4a6bc5e6ff76bd6361d4517333244ce6ea083b88b98b72b58d | Python | 185 | 5 | # -*- coding: utf-8 -*-
# Copyright (c) 2016-2018 Braintech Sp. z o.o. [Ltd.] <http://www.braintech.pl>
# All rights reserved.
"""Package providing different types of ring buffers."""
|
ce0f7d63f36ddaeb77a6d6d8da083527e17313eb7030592f9e429ca66d6cc6f6 | Python | 185 | 7 | from django.urls import re_path, include
from django.contrib import admin
urlpatterns = [
re_path(r'^', include('biomedisa_app.urls')),
re_path(r'^admin/', admin.site.urls),
]
|
f90580e0040d7267f90e56c8173496c3e164f6d30f44e7209578ebf1ddcef844 | Python | 185 | 4 | import os
# please refer to the readme on where to get the parameters. Save them in this folder:
folder_with_parameter_files = os.path.join(os.path.expanduser('~'), 'phys-seg_params')
|
4a6c3c78b1e3c2a31b6e88ba5c9eb2ad9ea407b91f310550f7b593f75c27d2e5 | Python | 187 | 7 | import torch.nn as nn
from .backward_only_leaky_relu import BackwardsOnlyLeakyReLU
def activation_types():
return dict(ReLU=nn.ReLU, BackwardsOnlyLeakyReLU=BackwardsOnlyLeakyReLU)
|
4c8b3765d6cc6c264eada0d579473328527a0dd36769be66702c2a1aad19e89e | Python | 187 | 6 | from . import cochlear_filters
from . import downsampling
from . import compression
from . import envelope_extraction
from . import cochleagram
from . import audio_transforms_cochleagram
|
66ebc63ae37bd5125090ce0e9ed3bcae5e448c5a8dd58aa80f83355564ca28b5 | Python | 187 | 7 | from .widgets import *
from .selectionWindow import *
from .constants import *
from .methods import *
from .plotWindow import *
from .projectWindow import *
from .terminalWindow import *
|
bf9af051d29675e67555fb3b2376a7d3cab2f8a390ead223d004b33e626fa8eb | Python | 187 | 3 | from tfep.io.dataset.traj import TrajectoryDataset, TrajectorySubset, get_subsampled_indices
from tfep.io.dataset.merged import MergedDataset
from tfep.io.dataset.dict import DictDataset
|
faf233f55166a6decec312caac3394ea2f4459bb59e2a2efbaee80eef52bfdcf | Python | 187 | 8 | """lightly.cli.config
The lightly.cli.config module holds default configs for the command-line
interface.
"""
# Copyright (c) 2020. Lightly AG and its affiliates.
# All Rights Reserved
|
fbe973451faa9dd949f193b105cfa56aad2c87443c793ef35af0a39951693996 | Python | 187 | 11 | # stlearn/spatial/__init__.py
from . import clustering, morphology, sme, smooth, trajectory
__all__ = [
"clustering",
"morphology",
"sme",
"smooth",
"trajectory",
]
|
55923c72f4faa0dd853599bc0274843ba66aaef70651642c12adce468a7868ac | Python | 188 | 6 | from mirp._data_import.dicom_planar_image import ImageDicomPlanarImage
class ImageDicomFileDX(ImageDicomPlanarImage):
def __init__(self, **kwargs):
super().__init__(**kwargs) |
a0d1330de5218a3aebea0881d86a29ad6baef1f528f385ac80bfa6dab2925d2a | Python | 188 | 6 | from mirp._data_import.dicom_planar_image import ImageDicomPlanarImage
class ImageDicomFileMG(ImageDicomPlanarImage):
def __init__(self, **kwargs):
super().__init__(**kwargs) |
cf06bb2d3b7a34b6c795bf58f2fa4cfd3e27bee0a5a65a068ef11e6e8d10a658 | Python | 188 | 6 | from mirp._data_import.dicom_planar_image import ImageDicomPlanarImage
class ImageDicomFileCR(ImageDicomPlanarImage):
def __init__(self, **kwargs):
super().__init__(**kwargs) |
044554f275138ad046cc64c6631d6bc397b51aa2098004ffe875bd483a4a73f9 | Python | 189 | 11 | import random
import torch
import numpy as np
def set_random_seed(random_seed: int = 0):
torch.manual_seed(random_seed)
random.seed(random_seed)
np.random.seed(random_seed)
|
65d2dec8e0c2226417c68cca240b8d8012847cb57cfeeaeb11a76bd0184e9b23 | Python | 189 | 9 | from .pseudo_spot import pseudo_spot
from .sme_impute0 import sme_impute0
from .sme_normalize import sme_normalize
__all__ = [
"pseudo_spot",
"sme_impute0",
"sme_normalize",
]
|
92df934dabdbac6da43aea11c74967587b0a4ba700e232ba2947b25e46cb6837 | Python | 189 | 14 | class PreprocessingWarning(UserWarning):
pass
class IOWarning(UserWarning):
pass
class PlottingWarning(UserWarning):
pass
class SegmentationWarning(UserWarning):
pass
|
a557e488962c653c205a1b4c768321d6d9e8a1406ccb8260584c8b8cb0e2142e | Python | 189 | 4 | from .augmentation import Jitter, KShuffle, Random, ReverseComplement, Sequential
from .tmm import TMM
__all__ = ["TMM", "Jitter", "KShuffle", "Random", "ReverseComplement", "Sequential"]
|
bbb84788518449ff330546e337c8f5ab37398769afd55455754b3c8f45e72491 | Python | 189 | 11 | from sys import argv
from msp import MSP
from msp_donorlike import setup_as_adjusted_donor
msp = MSP()
msp.file = __file__
msp.seed = int(argv[1])
setup_as_adjusted_donor(msp)
msp.run()
|
e300c963be6c5626f098e95d5b2563034ed4f7e933757c73c073c389ff84408e | Python | 189 | 7 | """Region Proposal Network."""
from __future__ import absolute_import
from .rpn import RPN
from . import bbox_clip
from .anchor import RPNAnchorGenerator
from .proposal import RPNProposal
|
e67054b7f502c849266a94f0999aa0977e67da758cab4548e4ba0489d8df241c | Python | 189 | 4 | from .analysis import adj_pvals, grid, load_lrs, run, run_cci, run_lr_go
from .het import get_edges
__all__ = ["adj_pvals", "get_edges", "grid", "load_lrs", "run", "run_cci", "run_lr_go"]
|
fef49a9a6d1964c5cc822502606ffeee038b42b46d3bac22afea725a19310311 | Python | 189 | 11 | from utils import utils
from utils.visualize import Visualize
from utils import metrics
from utils import heat_map
__all__ = {
'utils',
'Visualize',
'metrics',
'heat_map'
} |
6a4dc9a6e73fee7ab50f5875420a3a817a1729b50d621b51217e6b8350b4a496 | Python | 191 | 7 | import torch.nn as nn
def cosine(source, target):
source, target = source.mean(), target.mean()
cos = nn.CosineSimilarity(dim=0)
loss = cos(source, target)
return loss.mean() |
c78fa3ffa8c67770cc58f887fc60ab17fd5ef5a96e476eed17f8e98299bbe4cc | Python | 191 | 11 | """
The larvaworld Command Line Interface (CLI)
"""
from __future__ import annotations
__displayname__ = "CLI"
__all__: list[str] = ["SimModeParser"]
from .argparser import SimModeParser
|
0e215ee378c546a7b7d0977e8563a7bd7e8a528a3fe84dd5ab8955eb4e09fe19 | Python | 192 | 4 | from .ngym_random import TruncExp
from .plotting import plot_env
from .psychometric import plot_psychometric
from .scheduler import RandomSchedule, SequentialBlockSchedule, SequentialSchedule
|
81586efd8d74bcd9c23e8af1d20b43c51a9a1f111f1f7560477fe2914156bc86 | Python | 192 | 14 | """XCP-D data files
.. autofunction:: load
.. automethod:: load.readable
.. automethod:: load.as_path
.. automethod:: load.cached
"""
from acres import Loader
load = Loader(__package__)
|
358cbe4b8a0f8802d677b622a08eab13333b6b58d1d4912533b0adbf7652109d | Python | 193 | 11 | """
BdPy data format package
This package is a part of BdPy
"""
from .pd import *
from .datastore import *
from .sparse import *
from .features import *
from .kvs import SQLite3KeyValueStore
|
539170a70d6aa173542e07bf81b994ea75f20d7410108a2ea5520604f194a06c | Python | 193 | 6 | # pylint: disable=wildcard-import
"""Video action recognition, UCF101 dataset.
https://www.crcv.ucf.edu/data/UCF101.php
"""
from __future__ import absolute_import
from .classification import *
|
81c35e7746ae03f0852a9690b496dbd18964fe874231673f8a6bb2782290063c | Python | 193 | 9 | import os
import modular_splicing
DATA_DIRECTORY = os.path.join(
os.path.dirname(
os.path.dirname(os.path.dirname(os.path.abspath(modular_splicing.__file__)))
),
"data",
)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.