sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
176ac43de51f99faad2862040ea01edf9d89783136229910a33c0dabb96326ca
Python
14,748
262
# .\comet.win64.exe C:\Users\animeshs\HeLaReps\230301_hela_Slot1-54_1_3894.d\230301_hela_Slot1-54_1_3894_6.0.313.mgf # import sys from pathlib import Path #pathFiles = Path("C:/Users/animeshs/HeLaReps/230301_hela_Slot1-54_1_3894.d") pathFiles = Path("C:/Users/animeshs/HeLaReps") fileName='*txt' uniprotID='DECOY_' xCor...
26dc380b7588a747726034262dcb5819dbaa6228ecb44d8d5526b09115b1233d
Python
14,763
352
# This code is part of OpenFE and is licensed under the MIT license. # For details, see https://github.com/OpenFreeEnergy/openfe import os import pathlib import openmm import pooch import pytest from gufe import SmallMoleculeComponent from openff.units import unit from openmmtools.states import ThermodynamicState fr...
7322c81db31230ac4b56c6885d633af11a73c4570b4f141f2eda0cf28c1e62e1
Python
14,765
355
#!/usr/bin/env python # # Copyright (c) 2017 10X Genomics, Inc. All rights reserved. # from __future__ import annotations import os.path import re from collections.abc import Sequence from typing import TYPE_CHECKING import h5py as h5 import numpy as np import cellranger.analysis.clustering as cr_clustering import ...
4cf1c5e0bb225dd64cfaf2e2a50aea56c53f4e9d793d89dbc2b0b9d1181cd25b
Python
14,779
404
#!/usr/bin/env python3 """ WSI Inference Pipeline Performs sliding-window segmentation of Bielschowsky-stained WSI numpy arrays to predict axon masks. The input is a single full-resolution numpy array (wsi_clahe_enhanced.npy) rather than individual tiles; inference runs in horizontal strips to keep peak RAM manageable...
c39d094bd3c46577e6e6617a212b84520307e4218a13aabcbc9c0646deab66e0
Python
14,799
374
# ############################################################################ # # Copyright (c) 2022-2026 University of Helsinki # # Copyright (c) 2019-2022 Saint Petersburg State University # # # All Rights Reserved # # See file LICENSE for details. # ##################################################################...
1aae58cefb71df3d19ece885b611284abd87a984468026bb3cf93832483a33bb
Python
14,803
395
import torch import torch.nn as nn import pandas as pd import torch.nn.functional as F from .meta.electrode_names import channels class LogWaveletCWT(nn.Module): def __init__( self, scales, wavelet="morl", eps=1e-8, mean_normalize=False, bin_size=None ): super().__init__() self.scales ...
7be5ae7eb9b7206c2f7dc6d1201cfc21f75d95f2daa18956cab30a1acb6ca4f1
Python
14,826
348
# Copyright (c) Facebook, Inc. and its affiliates. from typing import Callable, Dict, List, Optional, Tuple, Union import fvcore.nn.weight_init as weight_init import torch from torch import nn from torch.nn import functional as F from detectron2.config import configurable from detectron2.layers import ASPP, Conv2d, De...
256975fcb57e7dc4f67b18cfe3c68fd15fd8e354afc9aa7ec8a5fc83e5c2e8ce
Python
14,848
535
"""Tests for experimental datasets.""" import numpy as np import pytest from mesa import Agent, Model from mesa.experimental.data_collection import ( AgentDataSet, DataRegistry, ModelDataSet, NumpyAgentDataSet, TableDataSet, ) from mesa.experimental.data_collection.dataset import DataSet def tes...
0a577ba0f570ffe5be5de7a393006afbaabb00ba57f393eb7eebd5d65e5a5c07
Python
14,891
286
import timeit import argparse import numpy as np import pandas as pd import torch.optim as optim import torch import torch.nn as nn import torch.nn.functional as fn from data_preprocess import * from Metapath_Augmentation.path_aug_model import Metapath_Augmentation from Structural_Augmentation.struc_aug import Structur...
86261ee59082ce0721a140b68a3700ad4dd097d1de10ec40b6949f04d2d8d449
Python
14,894
283
"""大脳皮質‐基底核回路ネットワーククラス""" from Neuron import LIFmodel from Input import PoissonNeuron from myfunc0829 import GetSynapsepath import numpy as np from numpy import dot import pickle from concurrent.futures import ThreadPoolExecutor import os rng = np.random.default_rng() def parallel_matrix_multiplication(ma...
ff555042dce965d9857189dbd5bb546abea75d4ce618028133a9bd086d9caf03
Python
14,912
391
#!/usr/bin/env python3 # # Copyright (c) 2017 10x Genomics, Inc. All rights reserved. # # TODO(Spatial team): This stage is no longer used by Count AGGR/Reanalyze at all, and # parse_aggr_csv.rs is used instead. # It's currently only used in Spatial Aggr, so we should extend parse_aggr_csv.rs # to handle Spatial Aggr ...
6d30916ec45a3bc47f7abd55e2b66fe86c6020a0fc0965e525fbc70d07c7470e
Python
14,916
383
#!/usr/bin/env python # # Copyright (c) 2024 10X Genomics, Inc. All rights reserved. # """Functions for calling cell-associated barcodes.""" from __future__ import annotations from typing import TYPE_CHECKING, NamedTuple import numpy as np import numpy.ma as ma from cellranger.analysis.diffexp import adjust_pvalue...
e06b3598cd44b483e191fcdbc00c44e213cebd1d962b96b7b1325a3ee9c106c6
Python
14,924
283
"""大脳皮質‐基底核回路ネットワーククラス""" from Neuron import LIFmodel from Input import PoissonNeuron from myfunc0829 import GetSynapsepath import numpy as np from numpy import dot import pickle from concurrent.futures import ThreadPoolExecutor import os rng = np.random.default_rng() def parallel_matrix_multiplication(ma...
227a753c30317fc26a1ed8fe987f0d5b05ba9edbff83eeda9b0102dcf13dbdaa
Python
14,984
420
# -*- coding: utf-8 -*- """Functions for working with triangle meshes + surfaces.""" from joblib import Parallel, delayed import numpy as np from scipy import ndimage, sparse from neuromaps.images import load_gifti, relabel_gifti, PARCIGNORE def point_in_triangle(point, triangle, return_pdist=True): """ Che...
31043552a01918ad2d1dc2e8b0696c03b522f2cf48f9a1d65f7f0a0a627b9257
Python
14,986
380
# Copyright (c) Facebook, Inc. and its affiliates. import copy import itertools import json import logging import os import pickle from collections import OrderedDict import torch import detectron2.utils.comm as comm from detectron2.config import CfgNode from detectron2.data import MetadataCatalog from detectron2.stru...
e3f7d5cdaf1d396d110d9f9be97bbd8dbf8f3ad657453962d5cf1dc4c332255d
Python
14,988
366
#!/usr/bin/env python # Copyright 2016-2026 Biomedical Imaging Group Rotterdam, Departments of # Medical Informatics and Radiology, Erasmus MC, Rotterdam, The Netherlands # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obt...
8b24ac3aacd4e30950932227d4016c4f564425113399d1528d3165efe97f9d0e
Python
14,989
332
""" apply_warp - Image registration transformation application Part of the micaflow processing pipeline for neuroimaging data. This module applies spatial transformations to register images from one space to another using affine and/or non-linear (warp field) transformations. It's commonly used to: - Transform...
ffe5b298f193ef55a73a04ba4a0751b6e5eedec681039e1a63e4f4be74e0a91b
Python
14,999
353
""" Connectors ========== <!-- difficulty: intermediate --> Show where a neuron talks to its partners. A neuron's *connectors* are its synapses, gap junctions - anything with a position on the neuron and a `type`. Any neuron that carries a `connectors` table can draw them, whatever its class, and every backend unders...
3ffb55f3a1ab857fb1b5806c2033764e67d11c55d89e8cd69fcd184c8d0c0537
Python
15,008
436
# This script is part of navis (http://www.github.com/navis-org/navis). # Copyright (C) 2018 Philipp Schlegel # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of...
8ed37613559cc2618b01fecbd102112ee45a571f11d9b988e8bc8fa18abbe843
Python
15,012
388
from types import SimpleNamespace import numpy as np import torch import stoic_train.lightning_model as lm from stoic_train.losses import ComplexProductLoss, ResidueWeightFocalLoss, SparsityLoss from stoic_train.lightning_model import StoichiometryModelLightning class DummyStoic(torch.nn.Module): def __init__( ...
ebe171edca7fe53b84bcf34ce73d8b6478eb191ef27c65af7ebd2f2695c455ce
Python
15,050
418
#!/usr/bin/env python3 """ =============================================================================== create_pyg_dataset.py — Build PyTorch Geometric datasets from enzyme structures =============================================================================== • Reads training/test CSVs (with columns incl. `unip...
d6f9e9780eeec4df98cd75534f9214b2869bea3869c6779e36a13391d87a356c
Python
15,070
336
#!/usr/bin/env python # Copyright 2016-2026 Biomedical Imaging Group Rotterdam, Departments of # Medical Informatics and Radiology, Erasmus MC, Rotterdam, The Netherlands # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obt...
e43aff325714a9921ca013b26d078e6353683c6af280bd5afec0f762b22d1d1c
Python
15,071
392
import os import sys import csv import argparse import itertools import pandas as pd import numpy as np import importlib import rootutils import torch from torch import Tensor from copy import deepcopy from lightning import seed_everything from tqdm import tqdm from types import SimpleNamespace from typing import List ...
abf60916cf832aff7096a722ac45a43ce3d783b0013bb40e209bc9ba729cf350
Python
15,076
408
#https://towardsdatascience.com/how-to-download-and-visualize-your-twitter-network-f009dbbf107b keyz = {k:v for k, v in (l.split('=') for l in open("F:/GD/scripts/keyz"))} #C:\\Users\\animeshs\\AppData\\Local\\Programs\\Spyder\\Python\\python.exe -m pip install tweepy #add long BEARER_TOKEN from https://developer.twitt...
fddb1e8b373053814e25c571d950bd37efc85ad19ae0d26f6a073e9668a277bc
Python
15,090
376
# This script is part of navis (http://www.github.com/navis-org/navis). # Copyright (C) 2018 Philipp Schlegel # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of...
92f57b8d4d7504d54c22eca876720f6661873f69e31b12cbfadd20dd444bf6c2
Python
15,093
418
"""Internal utilities for snakemake template.""" from __future__ import annotations import string from collections.abc import Iterator, Mapping, Sequence from typing import TYPE_CHECKING, Any, Final, overload import attrs from typing_extensions import LiteralString, override @attrs.define(frozen=True) class _Wildc...
c3959da96f4ee1bc1ef87e9e3eaf6f181a9ed5ce797b87b8f76322cd21ba5e6b
Python
15,099
369
# Copyright (c) Facebook, Inc. and its affiliates. import math from typing import List, Tuple, Union import torch from fvcore.nn import giou_loss, smooth_l1_loss from torch.nn import functional as F from detectron2.layers import cat, ciou_loss, diou_loss from detectron2.structures import Boxes # Value for clamping la...
91639ef79e8308f8b41b1f3ddeb9f6c936a1933b493a9de8cfb3cd4bcf8dbe8d
Python
15,103
463
""" Created on Tue Sep 23 13:12:00 2025 @author: dcupolillo """ from __future__ import annotations import numpy as np import pyabf from scipy.optimize import curve_fit from ipfx.feature_extractor import SpikeFeatureExtractor def ohm_law( voltage: float | None = None, resistance: float | None = No...
e77dfbf42e6bec9729ac7d3269aa0114de758d06b4089d81b0663cfc4768b972
Python
15,105
378
"""Tests for `navis.downsample_neuron` on skeletons. The focus is on what downsampling has to keep intact besides the node table: connectors and tags refer to nodes by ID, and most of those nodes disappear. """ import navis import numpy as np import pandas as pd import pytest # The methods that thin a skeleton by *...
93afadf7b69762b78b9c3ee839b4d83086dbf8bb0034fef7a881738ef5bc02fc
Python
15,118
443
""" Utility functions """ __author__ = "Fabi Bongratz" __email__ = "fabi.bongratz@gmail.com" import os import warnings import collections.abc from copy import deepcopy from enum import Enum import numpy as np import nibabel as nib import torch import torch.nn.functional as F from trimesh import Trimesh from skimage ...
a015767476208d83ecbd90eedd057989a9a350aa61dc200c2e4ba26e97f324d1
Python
15,122
367
import torch from torch_geometric.nn import knn_graph, radius_graph import numpy as np from scipy.sparse import csr_matrix from scipy.sparse.csgraph import connected_components from Bio.PDB.MMCIFParser import MMCIFParser from e3nn.o3 import spherical_harmonics from constants import ALL_LABELS_BACKBONE, ALL_ATOM_LABELS...
5c24b7593e2d8d387b7dfd5ccc6ab75c350db8b4f88fe1efe5969d58a10238fa
Python
15,139
368
from abc import ABC, abstractmethod import numpy as np import torch from torch import Tensor from torchmetrics.regression import SpearmanCorrCoef from chemprop.utils.registry import ClassRegistry UncertaintyEvaluatorRegistry = ClassRegistry() class RegressionEvaluator(ABC): """Evaluates the quality of uncertai...
e381d6adc7dc3b31e49315d7edaf6bb39c4ec105a1cf24b9bb32636083350af0
Python
15,144
379
""" ICMS83 DataLoader adapter. Produces the same trial_df and recording as the standard DataLoader but handles ICMS83's unique data layout: - Key files at S:/ICMS83/Keys/{date}/Ch{intan}_D{depth}_H{H}M{M}.mat with dataCellArr format (N x 1 cell, each entry 8 x 1): [0] stimLevel (µA) [1] respon...
d94c1949c3e10d45b6c4deb241009da245b2a71ab4d86f943ae8ac0640d75e9b
Python
15,150
315
import torch import torch.nn as nn import torch.nn.functional as F from taming.modules.losses.lpips import LPIPS from taming.modules.discriminator.model import NLayerDiscriminator, NLayerDiscriminator3D, weights_init class DummyLoss(nn.Module): def __init__(self): super().__init__() def adopt_weight(we...
d258a4f1b442f40b3f7d005f690a5cdca3f2fee6b012e6182e86d0be97dbb40d
Python
15,156
403
import os import re from itertools import product from bids.layout import BIDSLayout def read_bids_dataset(bids_input, subject_list=None, session_list=None, collect_on_subject=False): """ extracts and organizes relevant metadata from a bids dataset necessary for the dcan-modified hcp fmri processing pip...
7b03dc455cf24566688752f7e5a4661643e6ec8c5f93fa61fcba3a9d1d7a89be
Python
15,166
341
from __future__ import annotations import warnings from copy import deepcopy from functools import lru_cache, partial from typing import Union, Tuple, List, Type, Callable import numpy as np import torch from nnunetv2.preprocessing.resampling.utils import recursive_find_resampling_fn_by_name import nnunetv2 from ba...
f44b0d621ec3debcd8b2b16a065dd0baf55a8adb5dc3ba28296ac6aec87d6198
Python
15,171
416
""" Behavioural Statistical Analysis — P1 (Control vs PTSD) Boxplot + jitter, ggplot2 style. Separate figures for OF, EPM, DLB. Statistical pipeline: 1. Outlier removal — IQR 1.5× 2. Normality — Shapiro-Wilk per group 3. Two-group test — t-test (if both normal) or Mann-Whitney U (if any non-normal) 4....
7b2e7ac709ce068bb374fdbb4b7d23d56a7e08152247d9f43d19c20938536db4
Python
15,180
417
""" Configuration management for SpineDataset Created on January 21, 2026 @author: dcupolillo """ from __future__ import annotations from pathlib import Path import yaml import tensorflow as tf class SpineDatasetConfig: """ Manages configuration loading and parameter validation for spine analysis. ...
2bbd05a40d085a7d81653029afa0c96cef19c4275c3f8426e226a1c09a23cebc
Python
15,198
426
#!/usr/bin/python3 ################################################################################## # # MIT License # # Copyright (c) 2025 Kevin Rockenbach, Agnieszka Golicz # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "So...
4c0f6a847d5709f5b306000e017725d384ea66b3034b96da4f2da3000711d414
Python
15,220
273
import unittest from collections import OrderedDict from copy import deepcopy import numpy as np from batchgenerators.augmentations.utils import resize_segmentation from scipy.ndimage import map_coordinates from skimage.transform import resize from nnunetv2.preprocessing.resampling.default_resampling import resample_...
45b709a3442f5f8767f248f552a87812bef806f23a99e3e83e2a0a2f29af6027
Python
15,260
344
""" bet - Brain Extraction Tool Part of the micaflow processing pipeline for neuroimaging data. This module provides brain extraction (skull stripping) functionality using either: 1. SynthSeg-generated parcellations to create brain masks 2. User-provided binary masks It accurately segments the brain from su...
c46682a3b7d0abb9e225109e0154d0d45873ca60fb4a0993d4a448358955035c
Python
15,289
354
""" Plotting Overview ================= <!-- difficulty: beginner --> Which plotting mode and which backend to reach for, and how they compare. {{ navis }} draws neurons two ways: **static 2D figures** via [`matplotlib`](http://www.matplotlib.org), and **interactive 3D scenes** via [`octarine`](https://schlegelp.gith...
4dc82f2d8c035a8ef9f0f917a8b8bdeb384a12f3b90fe112985e82bcf69bae51
Python
15,336
409
# Copyright (c) 2020 10X Genomics, Inc. All rights reserved. """Code for simulating and fitting data from a Joint Inference By Exploiting Stoichiometry model. The model assumes that for a given number of labeled cells going through a GEM Well, we have a poisson based expectation around the number of k-lets (1,2,3,etc....
379204eb6ef4580a6eb321ee694c6e266acdb8f40449e1dec3bfd5447634f6cc
Python
15,345
411
from __future__ import annotations import argparse import copy import functools as ft import itertools as it import re from pathlib import Path from typing import Any, ClassVar import pytest from hypothesis import given from hypothesis import strategies as st import tests.strategies as sb_st from snakebids.plugins.c...
fa005b2e089010f03f419a104938cd5a10d148f5cd43852e25bb281d91405b42
Python
15,363
357
############################################################################ # Copyright (c) 2025-2026 University of Helsinki # All Rights Reserved # See file LICENSE for details. ############################################################################ """Tests for output format improvements: - ReadInfoPrinter (re...
0b3770b2c9053499bf48865c7c270ada567056a0411f5d2bbf9de0cad11b0cd5
Python
15,368
305
""" If you use this code, please cite one of the SynthSeg papers: https://github.com/BBillot/SynthSeg/blob/master/bibtex.bib Copyright 2020 Benjamin Billot Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the Lice...
dced0cef4c09ac8f1b79b7038224c951a23b2b0f2ca80214f9fa16f5b608827d
Python
15,369
429
""" Run UnitMatch on all animals (ICMS83 + experimental). Generates: - Per-animal unitmatch results (probability matrix, UIDs, tracks) - Combined tracking summary across all animals Usage: python -m batch_process.postprocessing.run_unitmatch python -m batch_process.postprocessing.run_unitmatch ICMS92 """ impo...
a8f9740f4020577764c7189c07c1a677228142194f8e99227924c67d6147d022
Python
15,378
476
"""Test the backends of the visualization package.""" import random import types from typing import ClassVar from unittest.mock import MagicMock import numpy as np import pytest from mesa import Model from mesa.discrete_space.grid import OrthogonalMooreGrid from mesa.experimental.continuous_space import ContinuousSp...
fce72fa2f81e0d5a126d72e08dbcc9e08a467233ea3a54e8c35d1ad3ff21b03a
Python
15,407
349
import os import random import shutil from pathlib import Path from typing import List, Tuple, Optional, Callable import cv2 import numpy as np import tifffile import torch from albumentations import ( Blur, GaussNoise, ShotNoise, RandomBrightnessContrast, Compose, RandomScale, RandomCrop, PadIfNeeded) from sc...
1382cf91d289d8c3e27c85a0a0e0dcfac386f28e4d2987d712fa591a524fe6f2
Python
15,441
392
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ axon_directionality.py – Grid-based axon orientation analysis of WSI masks. For each spatial resolution defined in axon_density.RESOLUTION_CONFIGS, divides the binary axon mask (wsi_axon_mask.npy) into a grid of square cells and computes structure-tensor orientation...
040553e1c9d496aa43b7ffc612fa617b4d0da964b097bb346057f8c4202906ad
Python
15,455
436
# Copyright (c) Facebook, Inc. and its affiliates. # pyre-unsafe import contextlib import io import logging import os from collections import defaultdict from dataclasses import dataclass from typing import Any, Dict, Iterable, List, Optional from fvcore.common.timer import Timer from detectron2.data import DatasetCa...
d605bacbf4044059e9082207e25fbce774924da5977381cb062ef39b5495d087
Python
15,463
471
# This code is part of OpenFE and is licensed under the MIT license. # For details, see https://github.com/OpenFreeEnergy/openfe from pathlib import Path from typing import Callable, Iterable, Optional, Union import networkx as nx from gufe import AtomMapper, SmallMoleculeComponent from konnektor import network_analy...
7a450720bd7a0404b35060f1145f83f65109da6515efcdb7b8d155bdf2329596
Python
15,473
370
""" Tier-2 prototype: build the tutorial gallery index ourselves. `mkdocs-gallery` still does all the heavy lifting - it executes every tutorial, renders the per-tutorial pages, exports the ``.py`` / ``.ipynb`` downloads and generates the thumbnails. This hook replaces *only* the rendered content of the gallery landin...
cedb98fb9dbbe5039f4d82d7be9943de202b5cafb048991d9fb894b713989ba2
Python
15,479
365
""" apply_warp - Image registration transformation application Part of the LAMAReg processing pipeline for neuroimaging data. This module applies spatial transformations to register images from one space to another using both affine and non-linear (warp field) transformations. It's commonly used to: - Transform subje...
26751fff2ac4d44efee2ba289d5aed9a4ac06d9543a7d6f3a41eadbaf47552f0
Python
15,483
378
""" Neuron Collages =============== <!-- difficulty: intermediate --> Arrange hundreds of neurons on a single page. !!! important "This example is not executed" Like the [light-level skeletonization tutorial](../0_io/zzz_tutorial_io_05_skeletonize), this one is *not* run when the documentation is built - it p...
0799471293f7c6c906b98014d13846062e833529ecfb377a8871bf7b602c1d6b
Python
15,497
394
import os, yaml, pickle, shutil, tarfile, glob import cv2 import albumentations import PIL import numpy as np import torchvision.transforms.functional as TF from omegaconf import OmegaConf from functools import partial from PIL import Image from tqdm import tqdm from torch.utils.data import Dataset, Subset import tami...
1bc681d2a9990890c26f9ade6aa82e7792e7552e318bfcf0945ab4137f4f5bc4
Python
15,503
335
"""Tests for the patch-grid planner and the stitching weights.""" import numpy as np import pytest from bio_image_unet.utils import tiling from bio_image_unet.utils.tiling import (ACTIVATION_BYTES_PER_FILTER, TileBlender, auto_batch_size, auto_patch_size, available_memory, ...
3589472e488035fa3110b74b9e9cc4948cfbd5da81df75db42e200cb47f08412
Python
15,507
370
#source https://www.bruker.com/protected/en/services/software-downloads/mass-spectrometry/raw-data-access-libraries.html import sys if len(sys.argv)!=2: sys.exit("USAGE: python pepCountTTP.py <path to MSn containing directory>, \n e.g.,\npython pepCountTTP.py \"F:/promec/LARS/TIMSTOF/Morten/210902 Morten 1 _Slot1-37...
5880195daa9c52c0530927fd1c7b4964f35b733d7c3664cdc358ac64337c0375
Python
15,508
366
""" If you use this code, please cite one of the SynthSeg papers: https://github.com/BBillot/SynthSeg/blob/master/bibtex.bib Copyright 2020 Benjamin Billot Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the Lice...
5dd745188f8831a705569dd2a181ec6046cae4cbc446d19480df94414a8f26a1
Python
15,533
381
import os import numpy as np import pandas as pd import matplotlib import matplotlib.pyplot as plt import anndata as ad import scanpy as sc from scipy.io import mmwrite, mmread import seaborn as sns import scipy np.random.seed(42) # load anndata dir_path = "/home/nomura/Proj/mmvelo/experiments/SHARE-seq_hf/2023-08-0...
dd3009cdc5f55e0f7413058a852bcd1643888ae4ce495fd011a1c210f39fca7b
Python
15,536
390
# Copyright (c) Facebook, Inc. and its affiliates. import collections import math from typing import List import torch from torch import nn from detectron2.config import configurable from detectron2.layers import ShapeSpec, move_device_like from detectron2.structures import Boxes, RotatedBoxes from detectron2.utils.re...
8fce7ef080d200c577d5fef9fd55827dd9c0d33398635eae6f17fb030ec781a6
Python
15,568
426
# This code is part of OpenFE and is licensed under the MIT license. # For details, see https://github.com/OpenFreeEnergy/openfe """ Generic tools for plotting networks. Interfaces NetworkX and matplotlib. Create subclasses of ``Node``, ``Edge``, and ``GraphDrawing`` to customize behavior how the graph is visualized ...
15698ed51443be85d3cb378fd4032792b3f8ecef162dc6b75b367033e0772d01
Python
15,641
515
"""_summary_ Utility functions for EEG visual classification project.""" import glob import os import argparse from pathlib import Path from datetime import datetime import platform import random import hashlib import torch from torch.utils.data import DataLoader import numpy as np import pandas as pd import matplotl...
a0643bb7ddadd4932c73bfa4581f3e7e36f8a3e80651b08e9a2fef895b01b949
Python
15,645
344
"""Tests for `navis.ml.sample_cable` and `navis.ml.sample_surface`.""" import navis import numpy as np import pandas as pd import pytest # --------------------------------------------------------------------------- # # Builders for controlled geometry # ---------------------------------------------------------------...
7edaec5d4f1c9b0c908c21fc91f23b96d96856626dcc82b70b5f616fe66b7db7
Python
15,648
352
import os, math import torch import torch.nn.functional as F import pytorch_lightning as pl from main import instantiate_from_config from taming.modules.util import SOSProvider def disabled_train(self, mode=True): """Overwrite model.train with this function to make sure train/eval mode does not change anymor...
2250a710be99633f33c7e2ab838789129fa7477ada3ddcce7b7461e0641d53e8
Python
15,659
324
#!/usr/bin/env python3 """Validate a portable RAVEN source release and its optional Zenodo payload. The default check deliberately accepts a clean GitHub clone with no checkpoints, experiment logs, downloaded VGG16 cache, or generated HDF5 datasets. Add ``--verify-checkpoints`` after extracting the Zenodo archive to ...
b4d9076af52e066cbe1d905da552a5ad855e136fdaf792acd271b1c47457fbc4
Python
15,702
395
# This script is part of navis (http://www.github.com/navis-org/navis). # Copyright (C) 2018 Philipp Schlegel # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 o...
8201a5ce9b3052583c3582f1bff4fc35324838940832c049aaeceef00428d891
Python
15,716
381
############################################################################ # Copyright (c) 2025-2026 University of Helsinki # All Rights Reserved # See file LICENSE for details. ############################################################################ """Tests for ExonSpliceSiteCounter: region-based exon splice-s...
9e4ffc6ff327e24118ce7f98181855b70b72c02304dd5c511a007fb8c6092d64
Python
15,719
460
#!/usr/bin/env python # # Copyright (c) 2020 10X Genomics, Inc. All rights reserved. # # Calculate data required for rarefaction and extrapolation curves. # """A stage for calculating clonotype diversity plot from clonotypes.csv. Classes: Clonotypes: used to load information from clonotypes.csv for the purpose of...
c6bb48998493bb74db5bf68affa9bb039508c9576781b22a744bf7ad6a3676c5
Python
15,730
330
############################################################################ # Copyright (c) 2023-2026 University of Helsinki # # All Rights Reserved # See file LICENSE for details. ############################################################################ """ Curio barcode detectors (formerly DoubleBarcodeDetector)...
323834ccb97317eddfc6b8595636cee3ccd358d8b3fdce695dcd4fb76dee4d53
Python
15,757
498
import numpy as np import pandas as pd from joblib import Parallel, delayed from sklearn.metrics import roc_auc_score, r2_score, average_precision_score, \ mean_absolute_error, mean_squared_error, precision_recall_curve, auc from sklearn.model_selection import RepeatedKFold, cross_val_predict, \ ParameterGrid, ...
07feac449fcf485be61eb3c49fb225699a27ce0fcedc3e4c2d9d94a2bf0687d3
Python
15,771
404
############################################################################ # Copyright (c) 2022-2026 University of Helsinki # # All Rights Reserved # See file LICENSE for details. ############################################################################ """Unit tests for the polyA / TSS prediction counters. The ...
b33ade702e7b4367becc01101a59f1370afc49d755d3c9208959af52e3a9db72
Python
15,782
448
""" synthseg - Neural Network-Based Brain MRI Segmentation Part of the micaflow processing pipeline for neuroimaging data. This module provides an interface to SynthSeg, a deep learning-based tool for automated brain MRI segmentation that works across different MRI contrasts without retraining. SynthSeg segmen...
bf1d0375d5a082b041cf060ef74f520baccd30b297ea2075cab3426d87e40c98
Python
15,798
359
import argparse import gc import inspect import os from pathlib import Path from typing import Union, Tuple import warnings import nnunetv2 import numpy as np import torch from acvl_utils.cropping_and_padding.bounding_boxes import bounding_box_to_slice from acvl_utils.cropping_and_padding.padding import pad_nd_image f...
9d6686ae760d3c3be017e66b79d10e66ea602c1acefb8d855018897b01e9b40d
Python
15,805
551
#!/usr/bin/env python """Run pseudobulk TF-activity inference with decoupler and CollecTRI.""" from __future__ import annotations import hashlib import json from pathlib import Path from typing import Any import anndata as ad import decoupler as dc import numpy as np import pandas as pd from scipy import sparse fro...
829ca6740b9b30bf8b565368b42994314fd5a0919f9ca275a80acbfbfd03e256
Python
15,807
354
import sys import mne import nibabel.freesurfer.mghformat as mgh import numpy as np from copy import deepcopy from toolbox import utils from numba import jit, float64 ## Constant to acces lh and rh in tuple LEFT_HEMI = 0 RIGHT_HEMI = 1 TRAV_OUT = "TRAV_OUT" STANDING = "STANDING" TRAV_IN = "TRAV_IN" TRA...
6c300eb7e925f853c4b456ed00bfbc26067d82fd0ba2b0e7e6f6fb7971eb9c80
Python
15,810
310
""" If you use this code, please cite the first SynthSeg paper: https://github.com/BBillot/lab2im/blob/master/bibtex.bib Copyright 2020 Benjamin Billot Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License ...
6359cf9a4c8d96c8201629e806906bc544012c93df69d4614a018f4f74253b9f
Python
15,843
440
"""The model class for Mesa framework. Core Objects: Model """ # Postpone annotation evaluation to avoid NameError from forward references (PEP 563). Remove once Python 3.14+ is required. from __future__ import annotations import random import warnings from collections.abc import Callable, Sequence from typing impor...
3a2b7d93f780cdc69f2475890363727fa9335aa54ec830334be63449c4550027
Python
15,884
311
import openmm import openmm.app as app import openmm.unit as unit from openff.toolkit.topology import Molecule from openff.units import unit as ffunit from openmmforcefields.generators import SMIRNOFFTemplateGenerator from rdkit import Chem import pdbfixer import numpy as np import h5py from collections import defaultd...
516d59aa3d693097cc2ee4958447028f78ce35f989f2c9550e94fc0cd55397f7
Python
15,915
423
# noqa: D100 import os import warnings from dataclasses import fields import numpy as np from matplotlib import pyplot as plt from matplotlib.cm import ScalarMappable from matplotlib.collections import PolyCollection from matplotlib.colors import LinearSegmentedColormap, Normalize, to_rgba from matplotlib.figure impor...
7348a8d90c3209af5fa5f9971999e0689350e0432c8068062f35ed335d135668
Python
15,922
409
"""Tests for the two face readings of mesh connectivity - `connectivity="face"` and `connectivity="manifold"` - i.e. components of faces joined by shared *edges* rather than components of vertices joined by shared faces. Each reading is strictly finer than the one before it, and each drops a kind of junction. `"face"`...
603b0de92ee7435503ddb1357ee36edb956bddd5f15d935d61372846f2f588cb
Python
15,925
465
import argparse import shutil import subprocess import sys from pathlib import Path from typing import Iterable, List, Tuple import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import numpy as np import torch SCRIPT_DIR = Path(__file__).resolve().parent ROOT = SCRIPT_DIR.parent RINAMI_DIR = ROOT ...
14c5fefabb61973d1b01a84ac92447ae0dc5eeaf3fe3625a098ad746e6a58b33
Python
15,926
379
import os import time import csv import h5py import numpy as np import argparse import matplotlib.pyplot as plt import pandas as pd import nibabel as nib from nibabel import processing as nibp # ------------------------------------------------------------------------ # 1) Locally define extract_bbox # ---------------...
47dffa4e78bb6f474212332b3fc4636036a6e4ec7ab3c4ac6677694f29086672
Python
15,926
379
import os import time import csv import h5py import numpy as np import argparse import matplotlib.pyplot as plt import pandas as pd import nibabel as nib from nibabel import processing as nibp # ------------------------------------------------------------------------ # 1) Locally define extract_bbox # ---------------...
91d520c1c43a9179bf651619780d342dee6a5ec96e0312fcdc776d3ff5ae2e58
Python
15,928
379
import os import time import csv import h5py import numpy as np import argparse import matplotlib.pyplot as plt import pandas as pd import nibabel as nib from nibabel import processing as nibp # ------------------------------------------------------------------------ # 1) Locally define extract_bbox # ---------------...
d451a4157e18e47bdfae44d166d15a5bdb6741eaa600f9e4fd2073351759903e
Python
15,930
379
import os import time import csv import h5py import numpy as np import argparse import matplotlib.pyplot as plt import pandas as pd import nibabel as nib from nibabel import processing as nibp # ------------------------------------------------------------------------ # 1) Locally define extract_bbox # ---------------...
3b2b6e055f9edb4c66721f97251f1886b7bf101fc5547b17f65ae90ef9f86ab9
Python
15,931
378
import os import time import csv import h5py import numpy as np import argparse import matplotlib.pyplot as plt import pandas as pd import nibabel as nib from nibabel import processing as nibp # ------------------------------------------------------------------------ # 1) Locally define extract_bbox # ---------------...
7afcde5314b76fb70d5ec1eef1827cc24809da101db5b2c99ee01a078e0d80b6
Python
15,932
379
import os import time import csv import h5py import numpy as np import argparse import matplotlib.pyplot as plt import pandas as pd import nibabel as nib from nibabel import processing as nibp # ------------------------------------------------------------------------ # 1) Locally define extract_bbox # ---------------...
c578e9f56f652fb9e731e50b21f115f5f639771995b66450634829eaf8c0ad36
Python
15,932
379
import os import time import csv import h5py import numpy as np import argparse import matplotlib.pyplot as plt import pandas as pd import nibabel as nib from nibabel import processing as nibp # ------------------------------------------------------------------------ # 1) Locally define extract_bbox # ---------------...
f5e982660215290f274ce9be5b1f2820e71a3142ad3c68a3a1d479775ab571a0
Python
15,932
385
""" Created on 10/08/2017 @author: Niklas Pallast, Markus Aswendt Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ from __future__ import print_function import os import time import re import sys import numpy as np import nibabel as nib import nibabel.nifti1 as nii import pv_...
8b63e4f641ead459028d2a47ec2ab41b86e6a5bc0d86ff88ca98de94ea84a85d
Python
15,934
377
import os import time import csv import h5py import numpy as np import argparse import matplotlib.pyplot as plt import pandas as pd import nibabel as nib from nibabel import processing as nibp # ------------------------------------------------------------------------ # 1) Locally define extract_bbox # ---------------...
cc499f5ebe378dda45582110880a8accbaa6249e785bfa4c3f75e174e6eb8038
Python
15,934
379
import os import time import csv import h5py import numpy as np import argparse import matplotlib.pyplot as plt import pandas as pd import nibabel as nib from nibabel import processing as nibp # ------------------------------------------------------------------------ # 1) Locally define extract_bbox # ---------------...
5ca46de480d0f5f3f1dfa47fc0a7a50de6c7a2f848e050183ea81a7522582e8f
Python
15,936
379
import os import time import csv import h5py import numpy as np import argparse import matplotlib.pyplot as plt import pandas as pd import nibabel as nib from nibabel import processing as nibp # ------------------------------------------------------------------------ # 1) Locally define extract_bbox # ---------------...
1dc5040d1f8897f3cdae594d18ba1eb248c646a19fd28c5ab4c748e264b70c65
Python
15,940
379
import os import time import csv import h5py import numpy as np import argparse import matplotlib.pyplot as plt import pandas as pd import nibabel as nib from nibabel import processing as nibp # ------------------------------------------------------------------------ # 1) Locally define extract_bbox # ---------------...
a5e3f60259ea651f18fd8c19defb55a39e7635b11634dbefcb071a4c96777027
Python
15,940
379
import os import time import csv import h5py import numpy as np import argparse import matplotlib.pyplot as plt import pandas as pd import nibabel as nib from nibabel import processing as nibp # ------------------------------------------------------------------------ # 1) Locally define extract_bbox # ---------------...
cf8694dde7c331e5b9c1af795ebc969c3021775f75e542bc056df87bffd76ea7
Python
15,942
379
import os import time import csv import h5py import numpy as np import argparse import matplotlib.pyplot as plt import pandas as pd import nibabel as nib from nibabel import processing as nibp # ------------------------------------------------------------------------ # 1) Locally define extract_bbox # ---------------...
050ae1131a83bdaed0d0673d610326e52680ca2bb558040b0f7481b9749ab2c7
Python
15,946
379
import os import time import csv import h5py import numpy as np import argparse import matplotlib.pyplot as plt import pandas as pd import nibabel as nib from nibabel import processing as nibp # ------------------------------------------------------------------------ # 1) Locally define extract_bbox # ---------------...
e0612d16531de0ef0e7a032ca5471a9ffe371cadc37bae912dab296747384efd
Python
15,946
379
import os import time import csv import h5py import numpy as np import argparse import matplotlib.pyplot as plt import pandas as pd import nibabel as nib from nibabel import processing as nibp # ------------------------------------------------------------------------ # 1) Locally define extract_bbox # ---------------...
969fa0e54e677d688bfe97f4173d040688f935990ab611f0b6fab905772bfc4f
Python
15,948
379
import os import time import csv import h5py import numpy as np import argparse import matplotlib.pyplot as plt import pandas as pd import nibabel as nib from nibabel import processing as nibp # ------------------------------------------------------------------------ # 1) Locally define extract_bbox # ---------------...
c64b43ad4a8d01a76270ffaefb6263a3438ad78c4a0d63a2e953e2feeecec8e5
Python
15,948
385
""" Created on 10/08/2017 @author: Niklas Pallast, Marc Schneider, Markus Aswendt Neuroimaging & Neuroengineering Department of Neurology University Hospital Cologne """ from __future__ import print_function import os import time import re import sys import numpy as np import nibabel as nib import nibabel.nifti1 a...