sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
09b945d4d2da8dd28ba9a309c0b3fa87fb33fb5bab444c53cef334e2aa125be7
Python
99,292
2,518
import base64 import collections import errno import io import json import logging import mmap import multiprocessing import os import shutil import signal import socket import subprocess import sys import threading import time from functools import cache from pathlib import Path from typing import IO, AnyStr, List, Op...
e1cc74b2bb1fd75cdf2e37c07bb86ced58ad384a0ed541ecc36b8e38e9e13762
Python
100,604
2,198
# based on : https://github.com/theislab/scvelo/blob/1805ab4a72d3f34496f0ef246500a159f619d3a2/scvelo/plotting/velocity_embedding_grid.py#L27 import numpy as np from sklearn.neighbors import NearestNeighbors from datetime import datetime from scipy.stats import norm as normal from typing import Union from scipy.spatial ...
4950d7181b95391e3dc9300fe022ff52c02e0aebb39491189275de62b9a98039
Python
100,992
2,706
import mozaik from mozaik.controller import Global from mozaik.experiments import Experiment from parameters import ParameterSet import mozaik.stimuli.vision.topographica_based as topo import mozaik.stimuli.vision.visual_stimulus as vs import numpy from mozaik.stimuli import InternalStimulus from mozaik.tools.distribut...
d2e44939816d8dc273ab41f87561411665eb894b8e7e2e2dc5f09e9e18faa708
Python
101,259
2,423
# tensor_generators.py # # On-the-fly data generation of tensors for training or prediction. # # October 2018 # Sam Friedman # sam@broadinstitute.org # Python 2/3 friendly from __future__ import print_function # Imports import os import csv import copy import math import h5py import time import logging import traceba...
e6acd5218304e45f13b84843e049e3077b03b0e8547372188bfb97c2b6e9b07a
Python
101,413
2,163
from __future__ import annotations from scanpy import read_10x_h5 from scanpy import logging as logg import json from pathlib import Path, PurePath from typing import BinaryIO, Literal import pandas as pd from matplotlib.image import imread from typing import Tuple, Optional, Literal, Dict import numpy as np from sci...
758845a94bc97970ba726f692a3f45821f577c0105a70db489f3ddb2df6433f2
Python
101,606
260
# TensorMaps automatically generated by tensor_map_maker.py # DO NOT EDIT from ml4h.defines import StorageType from ml4h.metrics import weighted_crossentropy from ml4h.tensormap.ukb.demographics import prevalent_incident_tensor from ml4h.TensorMap import TensorMap, Interpretation, make_range_validator # TensorMaps...
2ca43ede8e2bc559f1b11ed4431574c0ce6877a12e38e4467ac472f4c3f1d14d
Python
103,176
9,414
""" Copyright (c) Meta Platforms, Inc. and affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. Original CGCNN k-hot elemental embeddings. """ from __future__ import annotations KHOT_EMBEDDINGS = { 1: [ 0, 1, ...
8db9e947642965dcb57cb1d6b46e8fbbfc9ad5b418f8c7d1a102a8d301a83835
Python
103,193
3,898
MANUAL_CELL_MATCHES = { ('2018-08-07-5', 'data000'): '''#ON parasol 341:data001,1174;data002,1004 421:data001,18;data002,467 1114:data001,1052,1044;data002,1049 1032:data001,614;data002,1023 704:data001,396;data002,1085,1016 79:data001,532;data002,777 880:data001,381;data002,943 182:data001,1051;data002,593...
b61330d564c2a915828cbd21354a874da26e86353fa1ac8f935fe03dc86fadcb
Python
103,388
2,660
from typing import Dict, List, Tuple import torch import torch.nn as nn import torch.nn.functional as F from lpips import LPIPS from numpy import fromfunction from torch.fft import fftn from torch.nn.modules.loss import _Loss from pytorch_msssim import SSIM, MS_SSIM from src.handlers.general import TBSummaryTypes from...
5fd5c37139f41ad76d86a524c1645bba874b94dc16e5b43c42689d9ded6669f6
Python
104,911
2,279
""" UCE model implementation for omicverse. This module provides a wrapper for the UCE (Universal Cell Embeddings) model, following the exact logic of the original eval_single_anndata.py script. """ import os import tempfile import pickle import numpy as np import pandas as pd import torch import torch.nn as nn from ...
f52b37d40b0cff6bd428858e4fbc7e43fe5f7dbe2e62def69dcdd59d71e99976
Python
106,207
1,493
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'basic_form_pending.ui' # # Created by: PyQt5 UI code generator 5.15.2 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import Q...
63bf28ed41dc01cea123a8ddcaadb89a921a5f3c60d3fe9f13607b7bd115e449
Python
106,552
2,702
""" Copy from pegasus and cellual """ from typing import Union, Tuple, Optional, Sequence, List, Dict import anndata import numpy as np import pandas as pd import skmisc.loess as sl import scanpy as sc import time import warnings from scipy.sparse import issparse, csr_matrix from ..utils import load_signatures_fro...
ae0de02df64a8ccc3f370fd31af3280d533f538bfb5d7f10775679fc50f4b876
Python
107,050
1,678
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'auto_form.ui' # # Created by: PyQt5 UI code generator 5.15.2 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, Qt...
42aba69f78014b3bd455b6ffe0190b51a09b8aa5e8a317b300b811eb753f79d2
Python
107,225
1,659
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'auto_form.ui' # # Created by: PyQt5 UI code generator 5.15.2 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, Qt...
f4d8382424ac3470f0605eb6735a09ac4666595249c4b8c286b4aa91b3eefad2
Python
107,319
3,733
# Partially based on codebase by Leland McInnes (https://github.com/lmcinnes/umap) from __future__ import print_function import numpy as np import numba import scipy from scipy.optimize import curve_fit from sklearn.neighbors import KDTree from sklearn.metrics import pairwise_distances import warnings #INT32_MI...
be64137e83400bef24466525caa73117a260dc5aa57dbbb18f0ff486bee2e083
Python
107,384
2,118
""" Copy from pegasus and cellual """ import os import logging from functools import reduce from random import seed, sample from typing import Union, Optional, Sequence, Tuple, List, Dict import pandas as pd import anndata import numpy as np import matplotlib.pyplot as plt from scipy import sparse from matplotlib....
20c800bef87b29c6d84547bdbddcc3a1b0d3af0611b6b3d7f7e7531dea96850a
Python
108,707
3,541
import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import sklearn.decomposition as skd import sklearn.manifold as skm import sklearn.linear_model as sklm import sklearn.svm as sk_svm import scipy.stats as sts import arviz as az import itertools as it import seaborn as sns import f...
be6fec9ee31a5a40ac8eda1a3062acf2bab78eee3d49885a6f381fa6f86af565
Python
108,982
2,899
"""Neural net base class This is the most flexible class, not making assumptions on the kind of task being performed. Subclass this to create more specialized and sklearn-conforming classes like NeuralNetClassifier. """ import fnmatch from collections.abc import Mapping from functools import partial from itertools i...
dee6d4adde277241478ed059353c4a056391dd9c5e4d46739a08e375818d9356
Python
109,027
2,895
# Copyright (C) 2019-2022 Intel Corporation # Copyright (C) CVAT.ai Corporation # # SPDX-License-Identifier: MIT from __future__ import annotations import os.path as osp import re import sys from collections import defaultdict from collections.abc import Callable, Collection, Generator, Iterable, Iterator, Mapping, S...
9bca9fb2a09790ad06c9eef9d6e8ffe752efd72b8526af04614cacb3600dd5e9
Python
109,542
3,319
"""Trajectory visualizations shared by trajectory inference backends.""" from __future__ import annotations from dataclasses import dataclass from typing import Optional import warnings import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib.colors as mcolors import matplotlib.pathef...
65b7f0aec9b903fd32f93303f1e0e2895619583bdfc9b07329a3451d0bec352b
Python
109,638
1,551
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'basic_form.ui' # # Created by: PyQt5 UI code generator 5.15.2 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, Q...
c562601f0ed72b55e3e1f3e4acfd6289c0be8e624baf6338cf82ff8d1998293e
Python
109,790
2,111
'''This module implements the essential components of a microscopy setup. By assembling an excitation beam, a STED beam, a detector, and fluorescence molecules, to obtain a microscope setup. The following code gives an example of how to create such setup and use it to measure and plot the detected signal given some ``...
1c4182828cf3856a218200ce26deebf3e816097d6d118c4a278e61055750a442
Python
109,837
2,826
# Copyright 2023 Google LLC # # 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 at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
163f079c8226722533d324bf75e512087775460a4ef02471c121f07fb83a8e1b
Python
111,416
2,699
# # \file generator.py # # \brief Generates the CUTLASS Library's instances # import enum import os.path import shutil import argparse from library import * from manifest import * ################################################################################################### # def CudaToolkitVers...
4550622f902437e639377b1be5d2f70adfaecc845add8038c39255f5847991e9
Python
111,689
3,156
from collections.abc import Mapping import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from anndata import AnnData from matplotlib import cm from matplotlib.colors import Normalize, TwoSlopeNorm, to_hex from matplotlib.text import Text from pandas.api.types import CategoricalD...
b5feaf06f8e85df25297f7e65dc3275477dc3f2f6deb687a07f906838fe7b54e
Python
111,939
2,773
# Copyright (C) CVAT.ai Corporation # # SPDX-License-Identifier: MIT import gzip import io import json import math import os import os.path as osp import zipfile from collections import Counter from collections.abc import Iterable, Sequence from copy import deepcopy from functools import partial from http import HTTPS...
35b3d8d840604867aa73a5d867fa62bd934c489a276d6a9ddc5ac64ae59a62d3
Python
112,695
2,593
"""Pseudotime → terminal-state → lineage-fate unification. Implements the 4-step pipeline shared by MIRA (`mira.pseudotime.*`) and CellRank (`cellrank.kernels.PseudotimeKernel` + `GPCCA`), in pure numpy/scipy with no heavyweight dependencies (no pyGPCCA, no jax): 1. bias kNN graph — Palantir-style hard thr...
244be5ff2df2f064d8c1e13cfc1b502c25bc466a96c240b5e73977a9f4461402
Python
112,851
3,670
import os import numpy as np import pickle # import stan # import pystan as ps import arviz as az import scipy.special as spsp import sklearn.manifold as skm import sklearn.model_selection as skms import sklearn.svm as skc import sklearn.linear_model as sklm import sklearn.preprocessing as skp import sklearn.pipeline ...
faf03c01f810dee40a819f2f07a4f7d0a7dcc81d0af58e6ece4b8de7b4ccc36b
Python
115,869
2,565
import sys from dataclasses import dataclass from enum import Enum from typing import List, Union, Dict, Tuple, Callable, Optional import numpy as np import rawmovie.load_movie as load_movie import spikebinning from movie_upsampling import compute_interval_overlaps, integer_upsample_movie import visionloader as vl fro...
9e5e64ec95069ee14a3b4ff7be96c0f210458e51a1f4c80c2d1d9c549f17246a
Python
115,900
2,551
""" scGPT model implementation with simplified interface. """ import copy import json import time import warnings from pathlib import Path from typing import Dict, Any, Optional, Union, List, Tuple import numpy as np import pandas as pd import torch import torch.nn as nn from torch.utils.data import Dataset, DataLoad...
cadda70d677295e7efb64f5864a390dd22745c7a921fe8013b5c9f295151eea6
Python
119,053
1,389
import pytest import os import base64 import pathlib import sqlite3 import struct import zlib import hashlib import inspect import json from tabulate import tabulate import numpy as np from collections import defaultdict from candycrunch.prediction import * import candycrunch.utils from glycowork.motif.graph import co...
baf6af1c98405f61b1cc7e0198b27b4e9751a447327c46609df07d340cb5bdc4
Python
120,131
2,498
#!/usr/bin/env python import sys import datetime import argparse import json import warnings import textwrap import numpy import scipy import scipy.stats import pandas from matplotlib import pyplot from matplotlib.backends.backend_pdf import PdfPages from sv_utils import common, plotting, genomics_io, pedigree_tools, ...
1b39f8b8bd77cc75db07e4a58b1176ced41db5e5b34e4906004dd6eb54a2bb5a
Python
121,040
2,980
import inspect import logging from typing import ( TYPE_CHECKING, Any, Awaitable, Callable, Dict, Generic, List, Literal, Optional, Tuple, TypeVar, Union, overload, ) try: from typing import Never, ParamSpec except ImportError: from typing_extensions import N...
e02d866afef3c12b9d4f7bcd269f08905cd7126e4c6907068d4bad6f5ca3fb86
Python
121,492
3,033
#!/usr/bin/env python # -*- coding: utf-8 -*- """ The functions apply_shifts_dft, register_translation, _compute_error, _compute_phasediff, and _upsampled_dft are from SIMA (https://github.com/losonczylab/sima), licensed under the GNU GENERAL PUBLIC LICENSE, Version 2, 1991. These same functions were adapted from sc...
edb9f05f5db8e59a60c2b716ab178b08072f50a6ef59b20fa82f39b8a4d07b43
Python
122,044
4,269
import copy import logging import logging.handlers import os import pathlib import random import re import subprocess import urllib import urllib.request from collections import defaultdict from collections.abc import Iterable from enum import Enum from functools import lru_cache from queue import Queue from typing imp...
f0877c5a8aa73e31e3941fd18ff47240b3bf28399abfd98df9be5d559b8408a2
Python
122,074
3,031
import torch from torch.utils.data import Dataset, DataLoader, SubsetRandomSampler, random_split import pandas as pd import numpy as np import os import random from collections import defaultdict, Counter from itertools import combinations import json import torch.nn as nn import torch.nn.functional as F from sklearn.m...
0ec29c7a3cb37bf1ea1000326f3ff39be1b5a421a7d3f183dd5c929c4ad70eda
Python
124,752
2,246
import numpy as np import pandas as pd import os import itertools from scipy.stats import shapiro from scipy.stats import ttest_ind from scipy.stats import ranksums from tqdm import tqdm import pickle import time from mpl_toolkits.axes_grid1.inset_locator import inset_axes from matplotlib.patches import Rectangle #, Pa...
c2c863e6512fbd3481302ad5bd04251790938e38e9528128643273dbe171cb15
Python
128,397
2,102
# -*- coding: utf-8 -*- """ This module contains the Mozaik analysis interface and implementation of various analysis algorithms For more documentation refer to :doc:`mozaik.analysis` """ import numpy import scipy import scipy.signal import time import quantities as qt import mozaik.tools.units as munits from mozaik.t...
fbbd053fcae99cc3c86e17b4927c8e74d9ce53bba03dc87abf9647e895a731fb
Python
131,019
2,554
#!/usr/bin/env python # ================================ # @auther: Rongbin Zheng # @email: Rongbin.Zheng@childrens.harvard.edu # @date: July 2025 # ================================ import os,sys import time, re import pickle as pk import _pickle as cPickle from datetime import datetime import numpy as np import pand...
6fb48c90688f03bae231e5fc6a198c67a2f8c31af0abfa3eec83343c033ba5af
Python
131,732
3,442
# recipes.py import json # Imports import os import csv import copy import h5py import glob import logging import datetime import numpy as np import pandas as pd import keras from functools import reduce from google.cloud import storage from timeit import default_timer as timer from collections import Counter, defaul...
75c1b033e2a5cb46042cc260c373c277873ce445d810b0241cda52d6c3483d28
Python
138,531
2,925
# MRI-specific tensormaps import csv import logging import os from typing import Dict, Tuple, Callable import h5py import numpy as np from scipy.signal import convolve2d from scipy.ndimage import median_filter from scipy.ndimage.interpolation import rotate import tensorflow as tf from tensorflow.keras.utils import to_...
cf2b4e8d199decc3b9620e40831a27b53eab474c525a272980b110fac40dac2c
Python
144,113
3,318
import asyncio import logging import threading import time import traceback import uuid import weakref from collections import defaultdict from contextlib import nullcontext from dataclasses import asdict, dataclass from typing import ( Any, Dict, List, Optional, Set, Tuple, Union, ) import...
c7d0e5c48f668f0c69158047b3528cf5a1fe3e59f18e10533785dd45699b24e6
Python
144,465
2,479
from mozaik.analysis.analysis import Analysis from mozaik.analysis.data_structures import SingleValue, AnalogSignal, PerNeuronValue from mozaik.analysis.technical import NeuronAnnotationsToPerNeuronValues import numpy as np import numpy import mozaik.tools.units as munits from neo.core.analogsignal import AnalogSignal ...
c6b70409685a2f244253c44263ec489e2bf6de89d7d1b991c2990712ed91791c
Python
146,285
2,985
""" Geneformer model implementation for the SCLLM framework. This module provides a wrapper around the Geneformer model for single-cell RNA-seq analysis, including cell classification, embedding extraction, and in silico perturbation experiments. """ import os import json import warnings import pickle from pathlib im...
3fafa95522da886e6e6fdccbe985d0b4c69e8db5f295c97e81783b54e0a62efa
Python
146,667
2,142
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '.\isonet_star_0630.ui' # # Created by: PyQt5 UI code generator 5.15.2 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt...
37087e4ff99c58ead19a7cf95839db2d73767973edf07ac9c4d2df2951c73810
Python
150,626
3,961
# plots.py # Imports import os import csv import re import math import h5py import glob import logging import hashlib import operator import warnings from textwrap import wrap from functools import reduce from datetime import datetime from multiprocessing import Pool from itertools import islice, product from collecti...
a4872b62eff02af384a503c093e6e9328edd49ad09f512843c9a552435d489b0
Python
151,005
3,809
# Copyright 2023 Google LLC # 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 at # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, sof...
96f8a63ddb82243f28f56c46504fd4bcb0f9700217f51fe71491b98924140f51
Python
151,095
3,983
import atexit import dataclasses import faulthandler import functools import inspect import io import json import logging import os import sys import threading import time import traceback import urllib import warnings from abc import ABCMeta, abstractmethod from collections.abc import Mapping from contextlib import co...
efa19c9d34ede7ea8aecab0f383d8db01bb128492c4bf7fd7be22c93fd0bfad7
Python
151,463
3,951
# Copyright (C) 2018-2022 Intel Corporation # Copyright (C) CVAT.ai Corporation # # SPDX-License-Identifier: MIT import itertools import os import os.path as osp import re import shutil import textwrap import zlib from abc import ABCMeta, abstractmethod from contextlib import suppress from copy import copy from dateti...
10e225bbb255bfd3e874fb9c16f78d9f155453a0082d792562daeffda3fb36ec
Python
152,303
4,440
import os import sys import time # coding: utf-8 from typing import Dict, List, Optional, Tuple from unittest.mock import patch import pytest import ray from ray.autoscaler.v2.event_logger import AutoscalerEventLogger from ray.autoscaler.v2.scheduler import ( NodeTypeConfig, ResourceDemandScheduler, Reso...
1efd8b06df43bf5e8f4d0948c96d5b12e9f8ba9e9359b2c71322b5131dbb8eb9
Python
153,634
3,276
# biolgca is a Python package for simulating different kinds of lattice-gas # cellular automata (LGCA) in the biological context. # Copyright (C) 2018-2022 Technische Universität Dresden, contact: simon.syga@tu-dresden.de. # The full license notice is found in the file lgca/__init__.py. """ Abstract base classes. Thes...
e64c758e3fd8708ac8017f3e99193fc505579ae08bc1e6d811cb4f5fd306cd6b
Python
153,948
3,308
import numpy as np; np.set_printoptions(precision=2); np.random.seed(0) import torch; torch.set_printoptions(precision=2) import torch.nn as nn import matplotlib.pyplot as plt import matplotlib from matplotlib.font_manager import FontProperties from mpl_toolkits import mplot3d import seaborn as sns import time import...
49ed0c6069f85e80e7a34c1d7cf146a6ad1f79d31278d34dc2bd90a20ce31796
Python
159,790
2,472
""" Elikopy @author: qdessain, msimon """ import datetime import os import json import math import shutil import time import subprocess import matplotlib.pyplot import matplotlib import elikopy.utils from elikopy.individual_subject_processing import (preproc_solo, dti_solo, white_mask_solo, noddi_solo, diamond_...
b0f0f3bf720e6c1cc21b9fdc8f62290d56f57b1df9b3564d53573bc49d8a7a46
Python
163,252
3,904
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # pylint: disable=broad-except # pylint: disable=invalid-name # pylint: disable=line-too-long # pylint: disable=multiple-statements # pylint: disable=too-many-lines #------------------------------------------------------------------------------- ''' This file contains th...
42922631151f36f24b04b04c56cfc7c5e184fb978affa584c2e423ec9108392d
Python
165,455
2,242
import pylab import numpy import mozaik.storage.queries as queries import matplotlib.gridspec as gridspec from mozaik.visualization.plotting import Plotting from mozaik.visualization.helper_functions import * from parameters import ParameterSet from mozaik.storage.queries import * from mozaik.analysis.analysis import ...
1f1bc47d44629c1a9ff81a7a59771217799305fe2cd33ff044c75db4c74eaabd
Python
165,456
2,243
import pylab import numpy import mozaik.storage.queries as queries import matplotlib.gridspec as gridspec from mozaik.visualization.plotting import Plotting from mozaik.visualization.helper_functions import * from parameters import ParameterSet from mozaik.storage.queries import * from mozaik.analysis.analysis import ...
76c0452500c4258da93ed0fc3e0ca70fee617e08c995adc542b2538a97976727
Python
166,461
2,254
import pylab import numpy import mozaik.storage.queries as queries import matplotlib.gridspec as gridspec from mozaik.visualization.plotting import Plotting from mozaik.visualization.helper_functions import * from parameters import ParameterSet from mozaik.storage.queries import * from mozaik.analysis.analysis import ...
0fa270b83c230c7c3364769005dc15ed97875f247c94f4cb3ace19fccd862363
Python
169,974
3,166
from .bonsai_helpers import * import os from scipy.optimize import fminbound from scipy.spatial import distance import pandas as pd import csv from .bonsai_treeHelpers import Tree, TreeNode, optimiseTStar from . import bonsai_globals as bs_glob import copy import gc import json import heapq import logging FORMAT = '%...
54f4598e24084d8cb74616dcd7cb22b2e9b05b254044ca6e629c520e284b20a0
Python
170,504
3,837
import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import math from scipy import sparse import networkx as nx from matplotlib.patches import FancyBboxPatch, ConnectionPatch import matplotlib.patches as mpatches from sklearn.cluster import KMeans from sklearn.metrics.pairwise im...
04ad4ad805ca162b5c5f43dc76ce00570ac9c5488bfe9271748b5cd44500d73e
Python
175,174
4,081
from __future__ import annotations import json import logging import os import pickle import re from pathlib import Path import networkx as nx import numpy as np import pandas as pd from anndata import AnnData from scipy.sparse import csr_matrix from sklearn.metrics.pairwise import cosine_similarity from tqdm import t...
9b694100300293d43b27c00cc2c8004fb9d14511789c7fa65051a2eab603b146
Python
178,430
2,414
import pylab import numpy import mozaik.storage.queries as queries import matplotlib.gridspec as gridspec from mozaik.visualization.plotting import Plotting from mozaik.visualization.helper_functions import * from parameters import ParameterSet from mozaik.storage.queries import * from mozaik.analysis.analysis import ...
36395b0833041ba3ada4e3760c01f61837f204f4578e57bd79ad500f24986713
Python
181,734
5,180
# -*- coding: utf-8 -*- """ SASSI Signal Analysis Selection, Segmentation, and Integration formerly BASSPRO Breathing Analysis Selection and Segmentation for Plethysmography and Respiratory Observations *** built as part of the Russell Ray Lab Breathing And Physiology Analysis Pipeline *** Breathe Easy - an automated...
ac26c6bc91e23d0c03956eea150d458a10bda1b2cbec5aa08623acaabc576094
Python
182,107
4,737
"""Tests for net.py Although NeuralNetClassifier is used in tests, test only functionality that is general to NeuralNet class. """ import copy from functools import partial import os from pathlib import Path import pickle import re from unittest.mock import Mock from unittest.mock import call from unittest.mock impo...
1d02f11f60a3d627dffedfbbdaa4330100e14e0d33dd42e9e521ff1cc857ca37
Python
185,196
5,203
# coding: utf-8 # # Table of Contents # # 1. [Import stuff](#import_everything) # 2. [Set whether these analyses are done for this analysis or not](#set_whether_these_analyses_are_done_for_this_analysis_or_not) # 3. [Load data](#os.path.exists_checkpoint_fig_dir__load_data) # 1. [Set values for indexing](#Set_so...
3843b77a4d86e2cdf81f822975da4269112a3a53ed7231cca048397f41190ea0
Python
193,222
5,660
# coding: utf-8 # # Table of Contents # # 1. [Import stuff](#import_everything) # 2. [Set whether these analyses are done for this analysis or not](#set_whether_these_analyses_are_done_for_this_analysis_or_not) # 3. [Load data](#os.path.exists_checkpoint_fig_dir_load_data) # 1. [Set values for indexing](#Set_som...
6a9f7dc401a37dd0be8a35227158bbc668cf99a2c63a8760f9a8c8a3fece0457
Python
193,573
5,658
# coding: utf-8 # # Table of Contents # # 1. [Import stuff](#import_everything) # 2. [Set whether these analyses are done for this analysis or not](#set_whether_these_analyses_are_done_for_this_analysis_or_not) # 3. [Load data](#os.path.exists_checkpoint_fig_dir_load_data) # 1. [Set values for indexing](#Set_som...
a13f2b89d9304605f1d8991c6f0a9972fd2eac9847f604c5756cf272016bdfa7
Python
195,227
4,617
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # pylint: disable=broad-except # pylint: disable=invalid-name # pylint: disable=line-too-long # pylint: disable=multiple-statements # pylint: disable=too-many-lines #------------------------------------------------------------------------------- ''' This file contains th...
06e830c6494d23265c5628aec0543c1fd0fb5c8e100864888c28b2deaff151d8
Python
196,065
2,652
import pylab import numpy import pandas import scipy.stats import mozaik.storage.queries as queries import matplotlib.gridspec as gridspec from mozaik.visualization.plotting import Plotting from mozaik.visualization.helper_functions import * from parameters import ParameterSet from mozaik.storage.queries import * from...
e1554c698d92e04eaf5dc62f7243ad286eef2060cb2a8e4511281c589367a7c1
Python
198,770
3,091
import numpy as np import pandas as pd import scipy from scipy import sparse from scipy.sparse import csr_matrix, csgraph, find from scipy.sparse.csgraph import minimum_spanning_tree, connected_components import igraph as ig import leidenalg import time from datetime import datetime import matplotlib.pyplot as plt imp...
02722f8ab9b1db7f02e67258c942ff936345927ac263db46a8c77767f98cc48d
Python
200,000
3,040
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt5 (Qt v5.15.2) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x16\x8f\x48\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x0f\x47\x...
044dcce8fa4889ef686a18242a8e49d9f71794f5cf0bcf9c69ecc467e347e826
Python
200,000
864
from ml4h.defines import StorageType from ml4h.TensorMap import TensorMap, Interpretation categorical_21_completeness_80 = TensorMap( 'categorical_21_completeness_80', Interpretation.CATEGORICAL, shape=(21,), loss='mse', path_prefix='categorical', metrics=[], channel_map={ 'death': 0, 'Pacemaker_No...
048b9adb827f18c6855c6045bdbb1b28dfb8cda9070e1c62abdedf81d6c7d340
Python
200,000
5,463
""" Copyright (c) Meta Platforms, Inc. and affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. UMA Nitro: a standalone UMA-small model for energy, force, and stress inference. ``UMANitroModel`` is built directly from an inference checkpo...
0a8220fbbd6e9250c8524b72a9a76d5bbf3f416205ce5dfdde08b770d9a62daf
Python
200,000
2
import pandas as pd chm13_dict={'closest GENCODE ID': {'CHM13_G0002360': 'None', 'CHM13_G0002906': 'None', 'CHM13_G0003812': 'None', 'CHM13_G0006285': 'None', 'CHM13_G0007830': 'None', 'CHM13_G0008327': 'None', 'CHM13_G0008490': 'None', 'CHM13_G0008583': 'None', 'CHM13_G0011119': 'None', 'CHM13_G0014011': 'None', 'CHM...
0e0df1afd514a76edffb3059dea0cb0a634febf79c58fd7b38684fc8826eec32
Python
200,000
5,052
# Copyright (C) 2022 Intel Corporation # Copyright (C) CVAT.ai Corporation # # SPDX-License-Identifier: MIT import io import itertools import json import operator import os import os.path as osp import re import zipfile from collections.abc import Generator, Iterable, Sequence from copy import deepcopy from datetime i...
102d11d862891c9eaaf8bdcd33e4f5632c97d9dad215840ac0dc0fa9bfc99afa
Python
200,000
3,691
import numpy as np from sklearn.neighbors import NearestNeighbors from datetime import datetime from scipy.stats import norm as normal from mpl_toolkits.axes_grid1 import make_axes_locatable from scipy.spatial import distance from scipy.sparse import csr_matrix, csgraph, find import math import pandas as pd import nump...
2ee607c0587367e7fe10360fac4df65161ccd4875be5cc30860c8a810cd8aaa0
Python
200,000
5,116
# Copyright (C) 2019-2022 Intel Corporation # Copyright (C) CVAT.ai Corporation # # SPDX-License-Identifier: MIT from __future__ import annotations import mimetypes import os import re import shutil import string import textwrap import uuid import warnings from collections import OrderedDict from collections.abc impo...
33125397b5d3a6768dd201c9966925927e824aef312281e8b81abaddb5305355
Python
200,000
4,229
import os, platform, glob, sys import itertools os.environ["OMP_NUM_THREADS"] = "1" os.environ["OPENBLAS_NUM_THREADS"] = "1" os.environ["MKL_NUM_THREADS"] = "1" os.environ["VECLIB_MAXIMUM_THREADS"] = "1" os.environ["NUMEXPR_NUM_THREADS"] = "1" import numpy as np import pandas as pd import copy as copy_lib import warnin...
a1a9dccb01eff14c3458fd32a9009a59469446123e72ac7907ec83802d2cd7ff
Python
200,000
4,735
#!/usr/bin/env python # Created by Daniele Silvestro on 02/03/2012 => pyrate.help@gmail.com import argparse, os,sys, platform, time, csv, glob import random as rand import warnings, importlib import importlib.util import copy as copy_lib import json version= "PyRate" build = "v3.1.3 - 20260823" if platform.system() =...
bbc7ce97cb3928df9bea0c62873fbcb356c0b3c28b29679402a9ac48972e7662
Python
200,000
5,347
##### # Copyright (c) 2011-2025, NVIDIA Corporation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list...
be6a637eda5bcc557da56cb3db8bd358464dee0085f0e1fcbf919095de7c72f9
Python
200,000
2,615
#!/usr/bin/env python # # Hi There! # You may be wondering what this giant blob of binary data here is, you might # even be worried that we're up to something nefarious (good for you for being # paranoid!). This is a base85 encoding of a zip file, this zip file contains # an entire copy of pip (version 19.3.1). # # Pip...
d358dee83d35a07d6c19a33508d6f9800c693bf8efebae0810d5e795492fe668
Python
200,000
3,248
import datetime import os import shutil import json import numpy as np import math import subprocess from elikopy.utils import makedir import functools print = functools.partial(print, flush=True) def preproc_solo(folder_path, p, reslice=False, reslice_addSlice=False, denoising=False, denoising_algorithm="mppca_mr...
d4a06cd43f5d0346b497c34866181aac26938a232867037e2220e0d5b6078582
Python
200,000
3,690
import numpy as np from sklearn.neighbors import NearestNeighbors from datetime import datetime from scipy.stats import norm as normal from mpl_toolkits.axes_grid1 import make_axes_locatable from scipy.spatial import distance from scipy.sparse import csr_matrix, csgraph, find import math import pandas as pd import nump...
dff04306cfcb60b154675a82d5b020f44e644e50537c19374fdf82ad0d4ebfdc
Python
200,000
2,819
import numpy as np from ml4h.TensorMap import TensorMap, Interpretation from ml4h.normalizer import Standardize continuous_164_completeness_80 = TensorMap( 'continuous_164_completeness_80', Interpretation.CONTINUOUS, shape=(164,), loss='log_cosh', path_prefix='continuous', metrics=[], normalization=Standar...
f89b2187424020cc616058cdd53fa03e2bc6dba46877112381d735baf2824d5e
Python
200,000
1,722
""" From https://raw.githubusercontent.com/arneschneuing/DiffSBDD/ """ import numpy as np from rdkit import Chem import torch # ------------------------------------------------------------------------------ # Computational # ------------------------------------------------------------------------------ FLOAT_TYPE = t...
fd80c0d8ed1d18320c34bf149deee654954165ee5ea6119afeed78fa58cc0789
Python
200,000
3,592
from .bonsai_helpers import * from . import bonsai_globals as bs_glob import numpy as np import time from scipy.optimize import brentq, minimize from scipy.spatial import distance from scipy.sparse import csr_array, lil_array import itertools import os import gc from itertools import permutations from .bonsai_approxNN...
fd90a0205139e8f9ad64d5c8b3571154cdabf38aa0a714859eebc64ad2a2c75b
Python
200,000
5,342
# Copyright (C) 2020-2022 Intel Corporation # Copyright (C) CVAT.ai Corporation # # SPDX-License-Identifier: MIT import copy import io import json import logging import os import random import shutil import tarfile import tempfile import xml.etree.ElementTree as ET import zipfile from collections import defaultdict f...
dea9dd5ddd708ef6df87a9c3af439fca9892a65807bf7c134bdd22af2ca50a81
Python
200,002
2,912
import copy import math import os from pathlib import Path import ast import pickle from collections import Counter from functools import lru_cache import re import warnings from itertools import combinations, combinations_with_replacement, permutations, product from operator import neg import bisect import multiproces...
c4eefc60b3a7185dee717776b3973c720edf4abf1288e39960c0492e3a0957c5
Python
200,011
2,698
import ast import bisect import contextvars import copy import hashlib import inspect import os import random import re import pickle import pathlib import sqlite3 import struct import tempfile import zlib from collections import Counter, defaultdict from itertools import combinations_with_replacement, groupby, islice ...
9c395b147bc9b9a11b033c91ccf5bf0e12022616901714f515444320f691e393
Python
200,026
5,102
from __future__ import annotations import re import textwrap import warnings import io from contextlib import nullcontext, redirect_stdout from typing import Mapping, Sequence, Literal import anndata import matplotlib.pyplot as plt import networkx as nx import numpy as np import pandas as pd import seaborn as sns fro...
d57e0c4a9fd84b5c97a19a94791abcf61e4660d06091b995d32d8150c177fcdf
Python
200,046
2,982
"""CandyCrunch desktop app: run CandyCrunch on LC-MS/MS files, inspect and curate its predictions, and annotate spectra with CandyCrumbs""" import ast import contextlib import faulthandler import functools import glob import html import importlib.util import io import itertools import json import linecache import multi...
26827e8c087277a43f09f6714bca59035707dc32566e0870c65aa2a717a17766
Python
200,150
5,142
from ..utils import pyomic_palette from ..single import get_celltype_marker import numpy as np import pandas as pd from scipy import stats from scipy.sparse import issparse import h5py import anndata from tqdm import tqdm,trange import matplotlib.pyplot as plt import seaborn as sns import scanpy as sc from typing impor...
f03b372af0ae2dbb340ee1ab41a3917dae42e3d332d9876d23896d856cab018d
Python
200,260
3,716
import math import requests from time import sleep import numpy as np import pandas as pd import scipy.stats as stats import statistics import sys import warnings from scipy.spatial.distance import pdist, squareform from scipy.cluster.hierarchy import linkage, cut_tree, dendrogram, fcluster from scipy.cluster.hierarchy...
a0da107a311c2e986b0a3922ecb475a0d21872bd2eac4ca25ca23651267f0df4
Python
204,253
4,656
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import textwrap from scipy import sparse import networkx as nx from matplotlib.patches import FancyBboxPatch, ConnectionPatch import matplotlib.patches as mpatches from matplotlib import patheffects from sklearn.cluster import ...
6cc9ec2464143f396b4b1fb276b9a43659d4537c5014e677e99296232916144b
Quarto
1,669
61
--- title: "Distributions of allele-resolved counts" format: gfm: toc: true editor: source --- ```{r} library(ggplot2) library(dplyr) library(cowplot) library(Matrix) ``` ```{r} hippo1 <- readRDS('results/rctd_hippo_1.rds') hippo2 <- readRDS('results/rctd_hippo_2.rds') hippo3 <- readRDS('results/rctd_hippo_3....
7844c6cab97f038e2ff2caaba94046f537f1319e13ff9cb216900937d6f17a76
Quarto
3,744
111
--- title: MEEGLET format: html: code-fold: true jupyter: python3 bibliography: references.bib --- > Morlet wavelets for M/EEG analysis, [ˈmiːglɪt] This package provides a lean implementation of Morlet wavelets [@morlet_wave_1982] *designed for power-spectral analysis of M/EEG resting-state signals* [@hipp2012l...
09f0ed90b02da6d16cb4cf5766cbc351af4f2a2d25f85957a6b879d18758e393
Quarto
4,225
110
--- title: spASE format: gfm: toc: true --- R package for detecting 2D spatial patterns of allele-specific expression in spatial transcriptomics data while controlling for cell type. Provides functions for estimating, plotting, and testing for significant ASE patterns. This repository also contains the code to ...
68458ed35cdda1fb4e1d236f07b8e3034f33567bb82af6c1df9701b0dd8d6744
Quarto
4,568
212
--- title: "Visium and Slide-seq cerebellum, mixtures" format: gfm: toc: true editor: source --- ```{r} library(tibble) library(latex2exp) library(dplyr) library(ggplot2) library(rtracklayer) library(data.table) library(tidyr) library(Matrix) ``` ```{r} # for removing x chromosome genes gencode <- import('resu...
3118b2970cc747e70eb24cf4cc34cf2dea11d6197f951e5f53a8cd625d3f8210
Quarto
4,620
108
--- title: "Preprocessing" format: gfm: toc: true editor: source --- This document details the pre-processing steps run before the rest of the analysis scripts, including pointing to which scripts were run to perform each step. # Sample table See code in .qmd document for LaTeX table. \begin{table}[] \begin...
70aa2ec2498b10ca8e660e9f73bb964a67bec25002689dcfffa0bc41ebe0331c
Quarto
5,282
206
--- title: "Cell type maps" format: gfm: toc: true editor: source --- ```{r} library(spacexr) library(spASE) library(dplyr) library(tidyr) library(ggplot2) library(reshape2) library(viridis) library(pals) library(rtracklayer) library(ggrepel) library(ggthemes) library(tibble) gencode <- import('results/gencod...
e41d0e594861baede0ec8fe7c22de8784631c0fb167b3a9ee8d8bf0f0d031fe3
Quarto
6,080
219
--- title: "Analyzing 129 and CAST transcripts" format: gfm: toc: true editor: source --- ```{r} library(Biostrings) library(Matrix) library(ggplot2) library(tidyr) library(dplyr) library(tibble) library(DECIPHER) library(stringr) ``` # Load in data ```{r} tx <- readDNAStringSet('../inst/extdata/emase.pooled...