sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
1d2d553a02bc953e5e7a88fb40eb1892cb363618f124baba7dfc7725262b830b
Python
381
13
import pandas as pd import pcntoolkit path=r"" x = pd.read_pickle("/project_cephfs/3022051.01/untested_models/Cerebellum/HBR_10MDTB-CerebellumFunc-linear_7K_2sites/Models/meta_data.md") y = x.to_numpy(dtype="int") print(x) # import matplotlib.pyplot as plt # for i in range(10): # plt.clf() # t= x.iloc[:, i] # ...
32898b4fae5197539611de8162239d9d49963ceeda76a616f14613dbd770fe76
Python
381
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.seed = int(argv[1]) msp.architecture["num_motifs"] = 82 msp.architecture["motif_model_spec"] = dict( type="PSAMMotifModel", motif_spec=dict(type="rbns"), exclude_names=("3P", "5P"), ) msp.architecture["sparse_spec"] = dict(type="S...
40e1f7e96c3ae04f0c0ab650d92e79aa35c47d8102cf15a10c9c1390a37488bc
Python
381
19
# Generated by Django 2.2.6 on 2020-09-08 14:11 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('biomedisa_app', '0079_upload_batch_size'), ] operations = [ migrations.DeleteModel( name='MushroomPic', ), migrations.De...
496699e232ffc258433f20fa43722039f4ade4ceda1feabb4f67ac4ac3da8e48
Python
381
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.seed = int(argv[1]) msp.architecture["num_motifs"] = 82 msp.architecture["motif_model_spec"] = dict( type="PSAMMotifModel", motif_spec=dict(type="rbns"), exclude_names=("3P", "5P"), ) msp.architecture["sparse_spec"] = dict(type="S...
9152c71bb3ef7a5c050ca31c06488b54367122f515a6e8f9aba6258d3648c849
Python
381
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.seed = int(argv[1]) msp.architecture["num_motifs"] = 82 msp.architecture["motif_model_spec"] = dict( type="PSAMMotifModel", motif_spec=dict(type="rbns"), exclude_names=("3P", "5P"), ) msp.architecture["sparse_spec"] = dict(type="S...
0a6c42aa353f430a3b3fff10bd704deb8fa1a1364b8f22eeb0ed4d7b4a3e6f74
Python
382
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-217a3_1", original_model_step=1679715, ...
1f22cfa3206ae4ead12504afb60fc2e8c2744c0c9fd5f321e31f349441d08625
Python
382
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-163a1_1", original_model_step=1804935, ...
2297a61bd177a40125934b65b4d78684c1992f025b389367c4968bb8fa860db6
Python
382
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-223a1_1", original_model_step=3514635, ...
24b6642ddbe912309135216d2aa3209b57d3efc136ec27fbb535e581a4418fb6
Python
382
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-223d1_3", original_model_step=1902435, ...
2d5b590ea0ebc8a24f2ef02c55432a7c82320e51cd684cd1e28743a203b36aa0
Python
382
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-221a2_1", original_model_step=2943975, ...
3944be21abce9836d29596551c8d1e38edadb7cadc20de43474eadcdec54c669
Python
382
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-163a1_2", original_model_step=2212875, ...
40fc018eead534023759c82aede4ad5e8de4f6f87f0ea9a798bd78aef5022e80
Python
382
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-163b1_5", original_model_step=2448315, ...
4423603eca153dbc511bbac849f0929365d5b938a5c6259d981a3ea43cb91748
Python
382
12
#!/usr/bin/env python """ # Author: Yahui Long # File Name: __init__.py # Description: """ __author__ = "Yahui Long" __email__ = "long_yahui@immunol.a-star.edu.sg" from .utils import clustering from .preprocess import preprocess_adj, preprocess, construct_interaction, construct_interaction_KNN, add_contrastive_label,...
4fdeee1bcb4e62b57aba89df722c818d34f4ce363658da262fa5dde73b6f937b
Python
382
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-223b1_1", original_model_step=1627215, ...
6b7944ba97256736bf20ce86142a1a8ead2373899a8d857eefb2b6d6dd39fd63
Python
382
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-223b1_2", original_model_step=1894935, ...
6e06fc1f9d1c3415105f42b61580598f14f60d5927573af6bc08d937f74ddb5b
Python
382
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-163a1_3", original_model_step=1309275, ...
7272e94d33fde8b77f6d9ba8ea853ce28a71490422e6ffe755377501ca5106f8
Python
382
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-223d1_2", original_model_step=2250375, ...
9e7f026bc26d4010d16c385196dc0dd4e40827d63991a5f7307bf57036d13e55
Python
382
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-163b1_4", original_model_step=2618535, ...
abc1d0ea89c0470b73a48f15d51112d893f621928d5eabbd7b6a6db9e46d8812
Python
382
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-223c1_3", original_model_step=1857435, ...
af3e960f4d9204a1d84e184a1430715ea48f45bdaf9607b9d8a1c35458f15a35
Python
382
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-223c1_2", original_model_step=1702215, ...
cacec8906f1f6a0974c5439567267592a74f2835705647a55aedf999ed6c6da6
Python
382
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-219a1_1", original_model_step=1479495, ...
d8eea65e3deb2b0d7c98dfc23ff51d37c8f317d7041594c85c028b4c39e7e097
Python
382
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-223b1_3", original_model_step=1924935, ...
dd980fff49d4b29d4e4ed72374b5fd8ce1a19f7f90667dc4ec9cd17572baeb12
Python
382
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-223c1_1", original_model_step=2145375, ...
f0914825328ca070098fb71afc114f1e6e1457a42588f4755142ee0cbc850180
Python
382
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-219a1_3", original_model_step=1376775, ...
f2199ed3b00fcc3148ffa8d150b1e153d847d461cf837739466f9bc771b91b5f
Python
382
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-219a1_2", original_model_step=1429275, ...
f85006948f73b79db6da53f3cd9b9afea0186560b630ef5f7680658b952692c4
Python
382
7
__version__ = '2.0.0' # The functions of the module STalign.STalign are also those of the package, so that # `import STalign; STalign.LDDMM(...)` works with an installed STalign as it does when the # tutorials import STalign.py from the source tree (their "OPTION B"), and as # `from STalign import STalign; STalign.LDD...
ff28e92e649551e50c58239101bacdef46b32f6181444728f0f6a22cec71441c
Python
382
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-223d1_1", original_model_step=2072655, ...
1ec5542d80b6ed83a930a823602506ede761e0550cfad66d12a2bd54ac750657
Python
383
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-203aa1_3", original_model_step=2315595, ...
212ca332bfe60d4812501fd4b2938efcb8de252b8154fd97d13316898eea334c
Python
383
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-163ta1_3", original_model_step=1967655, ...
26a8af8a7c34ee61daaf8e029650ae2f5115969eeed16ec9f4fe0700fe27777a
Python
383
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-203aa1_1", original_model_step=2265375, ...
2c116ac3ace8519299dd14282236ca901be0a81c01393219e910a572efe43993
Python
383
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-163ta1_2", original_model_step=1990155, ...
5764754101febbbdd4a0c7c1f7bc68656b8deaf852529c68ba79d2ecfa26a193
Python
383
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-203aa1_2", original_model_step=2020155, ...
5ff0f63ce5aa00fac9f957e726c5df9fd1221ade3191c061236d0f7eda033c27
Python
383
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/msp-163ta1_1", original_model_step=2072655, ...
5059e0afc2abc633cef25155461028fce9bcba9dad2685fe8a376534de58122b
Python
384
15
import sys from ij import IJ # Fiji Jython interpreter implements Python 2.5 which does not # provide support for argparse. title = sys.argv[-6] width = int(sys.argv[-5]) height = int(sys.argv[-4]) depth = int(sys.argv[-3]) type = sys.argv[-2].replace("_", " ") tmp_image_path = sys.argv[-1] imp = IJ.newImage(title, ...
aee8a4fecac4eb32b1fd36d14a2cf55269e07448126079af07ee9e1c93f0581e
Python
384
8
from src.utils import download_axons try: # Test with a dummy experiment id just to see if it initializes # Don't actually call the download if possible, but the current implementation tries to download. # So I'll just print if it exists to verify import and function call setup. print("Function imported...
e8811e0cce3ee4f3a2c8b6575698749201206ac0c1fc600c1d9cc893eaf50ba1
Python
384
13
import torch from lightly.transforms import RandomFrequencyMaskTransform, RFFT2DTransform def test() -> None: rfm_transform = RandomFrequencyMaskTransform() rfft2d_transform = RFFT2DTransform() image = torch.randn(3, 64, 64) fft_image = rfft2d_transform(image) transformed_image = rfm_transform(ff...
09dea7647cd22353df028cbad92f78380f58a669180a066d54e352092b7f8496
Python
385
12
"""The lightly.cli module provides a console interface for training self-supervised models, embedding, and filtering datasets """ # Copyright (c) 2020. Lightly AG and its affiliates. # All Rights Reserved from lightly.cli.crop_cli import crop_cli from lightly.cli.embed_cli import embed_cli from lightly.cli.lightly_cl...
0ae6ea0192e567c6bd66b05877096d2a362660723056110debd4ae99649ad992
Python
385
15
#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write( "Error: Can't find the file 'settings.py' in the directory " "containing {!r}.".format(__file__)) sys.e...
9bced49e8018246bb09d12e769776b5505718044933e9ae63decfa26b202de4a
Python
385
10
class settings: def __init__(self): '''Fixed parameter settings used for simulations''' # Relative and absolute tolerances to solve the system with, [rtol, # atol] self.solver_tolerances = [1e-5, 1e-7] # The value that the membrane potential is clamped too before the ...
d83b2a49d6656c3eaae0136dfe75794bc4e7b34407c8d270cf8066ea886cfd50
Python
385
24
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.seed = int(argv[1]) msp.window = 40 msp.batch_size = 150 msp.architecture = dict( type="SplicePointIdentifier", cl=40, asymmetric_cl=(2, 20), hidden_size=100, n_layers=4, ) msp.data_dir = "../data/gtex_dataset/" msp.ex...
0d1b4690690ebb4e29a1b90a488b59902c84711cb7b14439ed20d1a0e09e298a
Python
386
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/rbnsp-80-adj2_5", original_model_step=2811255...
97a21d2905ae8969f6a36619ac5593f01bf4e3fe920f9f578e091b3456232df9
Python
386
15
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.batch_size = msp.batch_size * 2 // 3 msp.seed = int(argv[1]) msp.lr = float(msp.lr) * 0.9 ** 16 * 2 / 3 msp.architecture = dict( type="DiscretizeMotifModel", original_model_path="model/rbnsp-80-adj2_4", original_model_step=2005155...
5f1cb1c439ab3816a520258a59fecc8cd3cbc9c44abfe00aca151c9fdc0daa85
Python
387
14
import sys from typing import TYPE_CHECKING if TYPE_CHECKING: from ._font import Font from ._pad import Pad from ._subtitle import Subtitle from . import subtitle else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [".sub...
c191a56a943c1fa6e552344fa2033636ffa9331eb9bf4a504a0ab1854622d161
Python
387
13
from pl_bolts.models.gans.basic.basic_gan_module import GAN from pl_bolts.models.gans.dcgan.dcgan_module import DCGAN from pl_bolts.models.gans.pix2pix.pix2pix_module import Pix2Pix from pl_bolts.models.gans.srgan.srgan_module import SRGAN from pl_bolts.models.gans.srgan.srresnet_module import SRResNet __all__ = [ ...
0432908d27278f6aa57488749184eb9c2e6230fe2c5ff821b04b9d489f232445
Python
388
10
""" General and generalized linear modeling of spatial transcriptomics Option to call functions from CCI_effects_modeling (e.g. st.tl.CCI_effects_modeling.Niche_Model) or directly from Spateo (e.g. st.tl.Niche_Model). """ from .MuSIC import MuSIC from .MuSIC_downstream import MuSIC_Interpreter from .MuSIC_upstream imp...
32d438cf6e11fef9adc821cc053510e435f535f4860d97d4306bf2c9e2d2fca3
Python
388
18
# Generated by Django 2.2.2 on 2019-09-11 09:24 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('biomedisa_app', '0050_auto_20190822_1341'), ] operations = [ migrations.AddField( model_name='upload', name='queue',...
9ed1c269e6cb47bc1df97ccbd5208c200f4d163452022d34b29e295b45d98705
Python
388
24
from sys import argv from msp import MSP msp = MSP() msp.file = __file__ msp.seed = int(argv[1]) msp.window = 40 msp.batch_size = 150 msp.architecture = dict( type="SplicePointIdentifier", cl=40, asymmetric_cl=(20, 2), hidden_size=100, n_layers=4, ) msp.data_dir = "../data/gtex_dataset/" msp.ex...
b106cc50d234cb84935509fa5752e35dfd63d660cc4ab7258186cefd85ee3c42
Python
388
19
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-17 11:44 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('biomedisa_app', '0005_upload_allx'), ] operations = [ migrations.RemoveField( ...
36f0222f45a922fcc0bf02e40b2f4898d5057c4242fd8546f3f2068c056554dd
Python
389
15
"""Create a quorum queue using Kombu.""" from kombu import Connection, Exchange, Queue my_quorum_queue = Queue( "my-quorum-queue", Exchange("default"), routing_key="default", queue_arguments={"x-queue-type": "quorum"}, ) with Connection("amqp://guest@localhost//") as conn: channel = conn.channel(...
7210b2b68bdedb49795bd46e162c6190c1013b3706f847696ada8256670439f1
Python
389
5
from angorapy.analysis.investigators.base_investigator import Investigator from angorapy.analysis.investigators.predictability import Predictability # from angorapy.analysis.investigators.dynamics import Dynamics, LatentDynamics from angorapy.analysis.investigators.correlation import Correlation from angorapy.analysis....
5a354d34ebf4e13bc960d8e51681f1cab6df36f296cd167d2437a58ffb3b83de
Python
390
13
"""Tests for specparam.results.components.""" from specparam.results.components import * ################################################################################################### ################################################################################################### ## ModelComponents object d...
8026ade4df9bd20ada1bc44beda529f3a2f006762869a83c52421e58c03adc44
Python
390
19
import numpy as np import pytest import scanpy as sc from anndata import AnnData @pytest.fixture(scope="module") def rng() -> np.random.Generator: return np.random.default_rng(42) @pytest.fixture def filepath_h5mu(tmp_path) -> str: return str(tmp_path / "test.h5mu") @pytest.fixture(scope="module") def pbm...
eaceb9fe624c292d1defe9b0a31a383c01c190881e0fb0eacffd6c6b35f8ce1e
Python
390
16
""" Tests that everything is installed correctly. """ import unittest class TestCCI(unittest.TestCase): """Tests for `stlearn` importability, i.e. correct installation.""" def test_SME(self): import stlearn.spatials.SME.normalize as sme_normalise def test_cci(self): """Tests CCI can be ...
a06b5a6df90d3bca05327d7ca8f0175284ace69fb7d9d2470d14813796a42193
Python
391
9
from MoleculeACE.models.mpnn import MPNN from MoleculeACE.models.gcn import GCN from MoleculeACE.models.attentivefp import AFP from MoleculeACE.models.gat import GAT from MoleculeACE.models.cnn import CNN from MoleculeACE.models.mlp import MLP from MoleculeACE.models.ml import RF, GBM, SVM, KNN from MoleculeACE.models....
c8a68666d07360a00364ccdb4aad78fc0518a53e10018f6745109fef70c386a7
Python
391
15
"""Worker consumer.""" from .agent import Agent from .connection import Connection from .consumer import Consumer from .control import Control from .events import Events from .gossip import Gossip from .heart import Heart from .mingle import Mingle from .tasks import Tasks __all__ = ( 'Consumer', 'Agent', 'Connect...
22e63fe8286f6b64a625de0ac2b7604cf5d93378b80f9621e49dc01de8d74a9a
Python
392
23
import h5py from utils_rbns import list2seq path = 'binary_dataset/protein_RALYL/rbns_train.h5' data = h5py.File(path, "r") Y = data["Y"][:] i_s = list(range(Y.shape[0])) print(Y.shape[0]) exit(0) for i in i_s: if i < 100000: continue X = data["X"][i] Y = data["Y"][i] F = data["F"][i] L...
62cb21cd1b457be7a2d619f04b5c18eba8b6474436f2a51d3d7b3e1542a13c0f
Python
392
15
from modular_splicing.width_experiments.flank_robustness import ( models_to_analyze, compute_all_flank_robustnesses, genome_data, random_data, ) models = models_to_analyze() results_genome = compute_all_flank_robustnesses( models, genome_data, list(range(11, 1 + 21)) ) results_random = compute_all...
d883ed93422cf0e0b5ae05960e00cbf69d3eb736eba5bdcf809be9816cc1d040
Python
393
15
""" This module allow to analyse dataset """ from config_manager.config_manager import ConfigManager from dataset_manager.training_dataset_manager import TrainingDatasetManager class DatasetAnalyser: """ This class analyse a dataset """ def __init__(self, path_vocab): config = ConfigManager(p...
e9bd95754ce50d62d6d21784d5630f00f924af4ab11a4e8fae262f4e24ee8179
Python
393
12
import numpy as np import torch from torch import Tensor def tile(a: Tensor, dim: int, n_tile: int) -> Tensor: init_dim = a.size(dim) repeat_idx = [1] * a.dim() repeat_idx[dim] = n_tile a = a.repeat(*repeat_idx) order_index = torch.LongTensor(np.concatenate([init_dim * np.arange(n_tile) + i for i ...
ad2eeb6399d4f69442ffcdf33e0cab358073d6872a44723df30b2295388f6bcb
Python
394
13
from .base import GRUDBase __all__ = ['GRUD', 'GRUDpp'] class GRUD(GRUDBase): def __init__(self, in_size, hidden_size, lr, weight_decay): super().__init__(in_size, hidden_size, lr, weight_decay, pp_mode=False) class GRUDpp(GRUDBase): def __init__(self, in_size, hidden_size, lr, weight_decay): ...
bd06a1a877dac5da3220b0d73a36728a0f1a73137ca92e3e5efc2116e2486233
Python
394
18
# Generated by Django 2.2.2 on 2019-08-19 14:16 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('biomedisa_app', '0048_upload_heart'), ] operations = [ migrations.AlterField( model_name='profile', name='storage_si...
29c4720bccb8e0f25f0f53af29bb734d4729c280c8637963f3021bdc1442f7f1
Python
395
24
""" Use CodeCarbon but without loading the AMD GPU. pip install codecarbon """ import time from codecarbon import track_emissions @track_emissions( measure_power_secs=5, log_level="debug", ) def train_model(): """ This function will do nothing. """ print("10 seconds before ending script...")...
3315bd44244f072e6f3cde0c4ea239c36a8d4ca9eebdcb1e83d2f956154124a4
Python
396
18
# Generated by Django 3.0.4 on 2020-03-24 14:52 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('biomedisa_app', '0064_auto_20200324_1512'), ] operations = [ migrations.AlterField( model_name='mushroomspot', name=...
40095467ea97be29be14706081a78d5f5bd79ee026e3e0f6d9addb2ec312afcc
Python
396
12
import sys def progressbar(it, prefix="", size=60, out=sys.stdout): # Python3.3+ count = len(it) def show(j): x = int(size*j/count) print("{}[{}{}] {}/{}".format(prefix, u"#"*x, "."*(size-x), j, count), end='\r', file=out, flush=True) show(0) for i, item in enumerate(it)...
8e3ffdfa8e892d2b63e0178b77c82fb7823dffd43498b6e0139748394a7e908f
Python
396
18
# Generated by Django 2.1.5 on 2019-02-14 13:57 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('biomedisa_app', '0032_auto_20190214_1456'), ] operations = [ migrations.AlterField( model_name='upload', name='inver...
e2d8110a221d934c1bbf4807123c59f1f81228fdf131a51b863bb80b8dfc2dd2
Python
396
18
import os from sys import argv from spliceai_torch import load_model for tag in argv[1:]: path = f"model/{tag}" print(path) step = max(int(x) for x in os.listdir(path + "/model")) try: load_model(path, step) print("good!") bad = False except: bad = True if bad =...
483aeb08c7ca746b6585f0e92f2bea02f53dfee48eb46344ae7e922356770d30
Python
397
19
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-17 10:12 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('biomedisa_app', '0003_auto_20170517_1159'), ] operations = [ migrations.RemoveField( ...
5cb9fc9e5d91d7768145f92f1ac24fbd0e2b915aa691c0c77883f0961713596a
Python
397
16
# ruff: noqa: F401 """ matplotlylib ============ This module converts matplotlib figure objects into JSON structures which can be understood and visualized by Plotly. Most of the functionality should be accessed through the parent directory's 'tools' module or 'plotly' package. """ from plotly.matplotlylib.rendere...
7fab2fa20c3fa9b1fbb3254839a537fc1102ecee0f59d917a547cc5f836c7be9
Python
397
18
# Generated by Django 2.2.6 on 2020-09-02 11:59 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('biomedisa_app', '0077_auto_20200528_1202'), ] operations = [ migrations.AddField( model_name='upload', name='uncerta...
865828c06609f1649570f14ae8baa5158b9d858699b9b86ba602536614433db3
Python
397
18
# Generated by Django 2.1.5 on 2019-03-22 15:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('biomedisa_app', '0038_auto_20190322_1457'), ] operations = [ migrations.AlterField( model_name='profile', name='acti...
baef40e8e18d0bd508fe329fd20e5f1a99e3dbbc0a349f8a3edf165839277381
Python
397
21
"""Merge alembic heads after pulling external_user_id length extension forward Revision ID: 92fb564c7095 Revises: 987ce9839ecb, e93c5d0b47a9 Create Date: 2023-10-12 07:58:43.659168 """ # revision identifiers, used by Alembic. revision = "92fb564c7095" down_revision = ("987ce9839ecb", "e93c5d0b47a9") branch_labels = ...
c0fd66128e159137ae9c7dc4c32c3c034ab214fa482ec3a7f7f3566e24bcf2e3
Python
397
18
from abc import ABC, abstractmethod class Mutation(ABC): @abstractmethod def perform(self, rna): """ Perform the mutation on the given rna. """ pass @abstractmethod def footprint(self): """ Returns the footprint of this mutation, i.e., the a...
2111a039196766644d08d4990eec3246f56fe089391eaf561b5afc67aeb2e547
Python
398
10
from .adds.add_image import image from .adds.add_positions import positions from .adds.parsing import parsing from .adds.add_lr import lr from .adds.annotation import annotation from .adds.add_labels import labels from .adds.add_deconvolution import add_deconvolution from .adds.add_mask import add_mask from .adds.add_m...
f81c171dc5fd87e0c944e887027fd86e946c255c536f0722804aa7c3dcbccfba
Python
398
13
"""Transforms for Segmentation models.""" from __future__ import absolute_import from mxnet.gluon.data.vision import transforms def test_transform(img, ctx): transform_fn = transforms.Compose([ transforms.ToTensor(), transforms.Normalize([.485, .456, .406], [.229, .224, .225]) ]) img = tra...
009fc5faf0d07ec0c957041d23854a4e38b3fc061fb61402b0af2b47fbc6dc30
Python
399
16
import numpy as np import matplotlib.pyplot as plt from utils import tile_raster_images def plot_gabors(gabors): n, m = gabors.shape side = int(np.round(np.sqrt(m))) w = int(np.sqrt(n)) if w**2 < n: h = w + 1 else: h = w img = tile_raster_images(gabors, (side, side), (w, h), (2...
3e50c0c159e60dcea8d479633b4c3a6e83eb97709847871951a07001f804bac5
Python
399
18
# Generated by Django 3.1.2 on 2020-11-03 15:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('biomedisa_app', '0081_auto_20201030_1809'), ] operations = [ migrations.AlterField( model_name='profile', name='stor...
e5e819be649bdd1a169406e43499a1f0a2c71e84d74578fbb26bc38490693262
Python
399
12
from tns.morphmath import sample import numpy as np from numpy.testing import assert_equal def test_Distr(): params = {'soma': {'size': {'norm': {'mean': 9.024144162609812, 'std': 3.5462697985669935}}}} np.random.seed(0) soma_d = sample.Distr(params['soma']['size']) val = soma_d.draw_positive() np....
2dccbef8594e2106864c426db1fa8369d092ceefbbaa0dcf1cdd4d07297ce7c0
Python
400
17
import json from types import SimpleNamespace class Config(SimpleNamespace): def __init__(self, d): super().__init__(**d) @classmethod def from_file(cls, filename): with open(filename, 'r') as fh: d = json.load(fh) return cls(d) def serialize(self, output_path): ...
6322b29279dddd5d71254ea63540af7965284ec71f385cf4b0d6f259405a1906
Python
400
9
""" This module provides data loaders and transformers for popular vision datasets. """ from .video_cls.dataset_classification import VideoClsDataset from .video_cls.dataset_classification import build_dataloader, build_dataloader_test from .video_cls.multigrid_helper import multiGridHelper, MultiGridBatchSampler from...
90524e94fab83832a533f8856e33637c0759adbfb32a273476f5d5754a68b456
Python
401
21
path = "../../data/" sessions = range(1, 5) subjects = [3, 4, 6, 7, 8, 9, 10, 11] folder_spots_noboth = "aligned_noboth" threshold_distance = 6 # pixels colors_session = { 1: "#48634a", 2: "#8fc594", 3: "#990099", 4: "#ff66ff", "conserved": "black", } colours_types = { "cold": "#70A0CA", ...
cae298e1273c355083b26b91feba0debbb5ea37480ac22c50321a99e9311d279
Python
401
13
import pytest from PIL import Image from lightly.transforms.solarize import RandomSolarization class TestRandomSolarization: @pytest.mark.parametrize("w", [32, 64, 128]) @pytest.mark.parametrize("h", [32, 64, 128]) def test_on_pil_image(self, w: int, h: int) -> None: solarization = RandomSolariza...
e2f26aa844ad3bf5d018ca76d18ba79d4f9b372024954fe85f38b51febd73548
Python
401
12
from PyQt5 import QtWidgets from PyQt5 import QtCore from score_behavior.score_session_manager_control_ui import Ui_Form class SessionManagerControlWidget(QtWidgets.QWidget): def __init__(self, parent=None): flags_ = QtCore.Qt.WindowFlags() super(SessionManagerControlWidget, self).__init__(flags=...
f3305b8e237f5f2b7c20bc3e5101c396129d3cf08bfb0f9cd26af7baf5668dbc
Python
401
14
import os import sys BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) if BASE_DIR not in sys.path: sys.path.insert(0, BASE_DIR) os.environ["DJANGO_SETTINGS_MODULE"] = "biomedisa.settings" os.environ.setdefault("LC_ALL", "en_US.UTF-8") os.environ.setdefault("LC_CTYPE", "en_US.UTF-8") from dj...
fe042bf182ea314b4afc830d82f268417efeb8e0d596f09599cfa84ec830ecc0
Python
401
15
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created in July 2022 @author: Thomas Bonald <thomas.bonald@telecom-paris.fr> """ import numpy as np from scipy import sparse def get_laplacian(adjacency: sparse.csr_matrix) -> sparse.csr_matrix: """Return the Laplacian matrix of a graph.""" weights = adjacen...
e378b016a4d781a76e659f2b2161db224e627c5bf1c7d040ae662913870f3285
Python
402
13
# Train a model. from sklearn.datasets import load_iris from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import train_test_split iris = load_iris() X, y = iris.data, iris.target X, y = X[:20], y[:20] loss = list() X_train, X_test, y_train, y_test = train_test_split(X, y) clr = RandomFor...
e7079b300f8cdb3843f2d345fd1514a3dae5963db8679f06ea28d0f0ed3354fe
Python
402
15
import sys from typing import TYPE_CHECKING if TYPE_CHECKING: from ._decreasing import Decreasing from ._font import Font from ._increasing import Increasing else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ...
fce98ec9e1e197928875cffc7e89544731decf43057013fc80c65c878dcba89d
Python
402
6
from ._basic_models import FCN, dsFCN, CNN, dsCNN, RNN, dsRNN, Hybrid, dsHybrid, TutorialCNN from ._tf_binding_predictors import DeepBind, ResidualBind, Kopp21CNN from ._regulatory_classifiers import DeepSEA, Basset, FactorizedBasset, DanQ, Satori from ._cre_activity_predictors import Jores21CNN, DeepSTARR from ._singl...
7afd5ca534e3b964d65bfeb09c56ca5ae5c623c328e0b12c445f71dc35273f04
Python
403
10
__all__ = ['register','centroid','displacement','dsmmc','_dsmm_fullpy','_dsmmc_bare'] from .reg import register, centroid, displacement from ._dsmm_c_py import dsmmc from ._dsmm_c import _dsmmc_bare from ._dsmm_fullpy import _dsmm_fullpy #from .basic import centroid as centroid #from .basic import displacement as dis...
4873953c28141e7efb69f575bc57c51e26b4cc2749f51885c82194b876bc8dbf
Python
404
16
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='project', version='0.0.0', description='Describe Your Cool Project', author='', author_email='', # REPLACE WITH YOUR OWN GITHUB PROJECT LINK url='https://github.com/PyTorchLightning/pytorch-lightning-conference-...
bc6225c0dc1b5b0e9f430609cc924c18423eefe4f3d8b43f9f12d3b0e92892d0
Python
404
14
""" BdPy machine learning package This package is a part of BdPy """ from .learning import Classification, CrossValidation, ModelTraining, ModelTest from .crossvalidation import make_cvindex, make_crossvalidationindex, make_cvindex_generator from .crossvalidation import cvindex_groupwise from .ensemble import * from...
53174bb70deae01fa2819b07c3ec04369abdd28f0aa7e25863594fc6f7e7f4b8
Python
405
13
""" BdPy MRI package This package is a part of BdPy """ from .load_epi import load_epi from .load_mri import load_mri from .roi import add_roimask, get_roiflag, add_roilabel, add_rois, merge_rois, add_hcp_rois, add_hcp_visual_cortex from .fmriprep import create_bdata_fmriprep, FmriprepData from .spm import create_bda...
5a854774d05cabe4f6bf905e65adeb4d00f8e077b37feb64a2185e4b673f8eaf
Python
405
14
import glob import sys import os sys.path.insert(0,os.path.abspath("../../../src/")) import pyabf if __name__=="__main__": PATH=R"X:\Data\projects\2017-01-09 AT1-Cre mice\2017-01-09 global expression NTS\data" for fname in sorted(glob.glob(PATH+"/*.abf")): abf=pyabf.ABF(fname) if not abf.commen...
5e8fb48a8ab709159c78faaf1852b62813d01cf81a185aca2bfa6f9696f80aeb
Python
405
16
import logging from tqdm.auto import tqdm # REF: https://stackoverflow.com/a/38739634 class TqdmLoggingHandler(logging.Handler): def __init__(self, level=logging.NOTSET): super().__init__(level) def emit(self, record): try: msg = self.format(record) tqdm.write(msg) ...
da67f8f3f04de633acd2e2f28169fd6447b87eadf73d65809cfbc098c185c58b
Python
405
18
# Generated by Django 3.2.6 on 2023-11-30 00:23 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('biomedisa_app', '0103_upload_validation_data'), ] operations = [ migrations.AlterField( model_name='profile', name='...
e45b2fcb50c9703fc522ece433d38b1b68ad3a146d470475c55aa4ee66fc534d
Python
405
18
# Generated by Django 3.2.6 on 2022-08-10 14:00 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('biomedisa_app', '0092_auto_20220617_1255'), ] operations = [ migrations.AddField( model_name='profile', name='platfo...
643f3b5a019682c226847886ab7123b106ab68e49655ee3887b3b7020baa8e85
Python
406
17
""" test to see what can be imported in python 2.7 """ import os import sys PATH_HERE = os.path.abspath(os.path.dirname(__file__)) PATH_DATA = os.path.abspath(PATH_HERE+"../../../data/abfs/") PATH_SRC = os.path.abspath(PATH_HERE+"../../../src/") sys.path.insert(0, PATH_SRC) print("importing special pyabf2") import py...
955e0518e19a2c63efa5503a8ff521b0afb4007d356ad365c0bf1b299aadf385
Python
406
17
"""Main application window package. Keep imports lazy to avoid circular imports when other modules import `pyjibe.head.*` utilities (e.g. custom widgets) while `pyjibe.head.main` pulls in the registry. """ from __future__ import annotations __all__ = ["PyJibe"] def __getattr__(name: str): if name == "PyJibe": ...
e343e291dbc9c24210de7acc2d782eba76666fc4cd28356e802852e0a225edb8
Python
406
13
from pl_bolts.models.detection import components from pl_bolts.models.detection.faster_rcnn import FasterRCNN from pl_bolts.models.detection.retinanet import RetinaNet from pl_bolts.models.detection.yolo.yolo_config import YOLOConfiguration from pl_bolts.models.detection.yolo.yolo_module import YOLO __all__ = [ "c...
e4b135ff8aca02d2ea0450e576d952ea0ac3e312a09f287900950fccb1770964
Python
406
29
from neuron import h, gui import numpy as np def test_lin(): s = h.Section() s.insert("lin") h.finitialize() a = h.a_lin b = h.b_lin c = h.c_lin d = h.d_lin A = np.array([[a, b], [c, d]]) exact = np.linalg.solve(A, [0, 0]) x = s(0.5).lin.xx y = s(0.5).lin.yy asse...
f8f6358f519c5b88e0c70ac1f04874b032afcf4d234e1ae86abbb5faa6a522af
Python
406
18
# Generated by Django 3.2.6 on 2024-05-02 06:49 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('biomedisa_app', '0106_alter_upload_header_file'), ] operations = [ migrations.AlterField( model_name='upload', name=...