sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
238ede770552f6ff012ec035f192699263f6e805665727006a30a65e60f6d27d
Python
44,652
907
""" PLS Discriminant analysis script. Includes bootstrap and permutation. Examples in run.py as run_pls*(...) """ import numpy as np import pandas as pd import scanpy as sc import matplotlib.pyplot as plt from joblib import Parallel, delayed from numpy.random import default_rng from scipy.stats import pearsonr, ke...
50ac5efa8b8be1cf10f409c1e62bb01659caf3d02397531243192a7d0aeb0d9b
Python
44,698
1,178
from contextlib import nullcontext import os from pathlib import Path from types import SimpleNamespace from unittest.mock import MagicMock, Mock from chemgraph.models.supported_models import supported_argo_models from ui._pages import main_interface as main_ui from ui.message_utils import extract_molecular_structure,...
e9229c92a86536956dacf30ee4a1c6e5bbe471ca67c463952f917be0e7ac62b0
Python
44,820
1,186
"""Functions in this module are responsible for mapping type annotations to widgets.""" from __future__ import annotations import datetime import inspect import itertools import os import pathlib import sys import types import warnings from collections import defaultdict from collections.abc import Callable, Iterator...
b7e1479ecca2aabc1a00fb777933f5f65aac4c5ec29a30067754c4e57d9b4429
Python
44,855
1,193
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved import contextlib import fnmatch import gc import json import logging import math import os import time from collections import OrderedDict from dataclasses import dataclass, field from typing import Any, Dict, List, Mapping, Optional import num...
daf6f832099986864d87adfec62d69d2127399ca7b96f0ebbd2ce18caab55742
Python
44,855
1,193
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved import contextlib import fnmatch import gc import json import logging import math import os import time from collections import OrderedDict from dataclasses import dataclass, field from typing import Any, Dict, List, Mapping, Optional import num...
42f413e4de36b4cbb539f09270f6ef04ad80b1ce4a26a6a79724312a1f9f2cff
Python
44,873
1,022
# Generated by the protocol buffer compiler. DO NOT EDIT! from google.protobuf import descriptor from google.protobuf import message from google.protobuf import reflection from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) DESCRIPTOR = descriptor.FileDescriptor( name='vgg_caffe.proto'...
a7144247839a9e0af79bddd553063ee99d102bfbf8c429f56c56cb052ef1b5fe
Python
44,884
1,305
# Copyright 2019 Calico 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, ...
032478aa44f3d8edd14382f1a527cf880ce7c1879421a8639af477da6bdab84d
Python
44,886
981
"""Run cross-day cell tracking over a dataset. Ties the pieces together in the order the design requires: 1. group recordings into chains (``chains``) 2. rasterise iscell-filtered footprints (``footprint``) 3. solve robust per-session offsets (``register``) 4. **gate**: chains in which no session would move by ``min_...
95eb477dcabf63c64948bfa8af5baf6819c9f01deda8d7e6545bd0addac96a15
Python
44,937
975
"""A local web viewer for a ``.meanap`` bundle. Express mode ships data instead of pictures; this serves the pictures back on demand. The front end is HTML so the figures live where people already read things, and so vector output is a click away rather than a file dialog; the back end is the same Python that drew the...
b42ae8a60b019f0f437c9f363f2021f3fa2d007fe3c1e937c3c0c079f5303956
Python
44,943
1,108
from sklearn.cluster import AgglomerativeClustering from sklearn.decomposition import PCA from sklearn.cluster import KMeans from scipy.stats import rankdata import scanpy as sc import pandas as pd from anndata import AnnData import warnings from builtins import int warnings.filterwarnings('ignore') import losses, mi...
d8bdba31cf6dcc495678974fc39d8ae5893d63fc73229715c879584b6f6f1dbe
Python
44,943
969
import torch torch.multiprocessing.set_sharing_strategy('file_system') import matplotlib matplotlib.use('Agg') import os import os.path as osp from torch.utils.data import DataLoader import sys os.chdir('/project/roysam/rwmills/repos/cluster-contrast-reid/') print(os.getcwd()) # print(os.listdir()) import os #RWM prin...
3ffadaf81e629c319dfd36eec179ec8fd1300472e94f8ae8083c50ae772903ef
Python
44,968
1,462
import warnings import matplotlib as mpl import matplotlib.gridspec as gridspec import matplotlib.pyplot as plt import numpy as np from matplotlib.collections import LineCollection from scipy import signal from .. import auxiliary, core from . import utils # import plotting/utils from .helpers import RasterLabelData...
c3bb43e7f30f0298c94d1f2f5a27022f807fcf815a7893c88163411527f2eac0
Python
45,090
1,144
############################################################################# # Copyright (C) 2020-2026 MEmilio # # Authors: # # Contact: Martin J. Kuehn <Martin.Kuehn@DLR.de> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may...
abee69ff4af3519da4301a4249315106ded591fb414ce9fe4bdf44aab2137c05
Python
45,130
933
import numpy as np import pandas as pd import scipy as s import sys from time import sleep from time import time from typing import List, Optional, Union from itertools import chain from mofapy2.core.BayesNet import * from mofapy2.core import gpu_utils from mofapy2.build_model.build_model import * from mofapy2.build_m...
11dd6a1116d809c627e973cb0ed7c06e96c484ff908328f7f63ecf22ebc3dc2e
Python
45,159
1,167
import time import os import numpy as np import scipy.stats as stats from typing import Union try: from importlib.resources import files tmp = files("encore.gui") except (TypeError, ImportError): # Python < 3.10 from importlib_resources import files from encore.validators.algorithm_parameters import vali...
62d69200a195dc8de43baaad808a027d77de1cdc9e43ea5eed495fe7e1e00a8f
Python
45,236
1,207
"""Core simulation functions — the single source of truth. Every callable here is a plain Python function (no LangChain ``@tool``, no MCP ``@mcp.tool``, no Parsl ``@python_app``). Framework-specific wrappers in ``ase_tools.py``, ``mcp_tools.py``, and ``parsl_tools.py`` simply delegate to these functions. """ from __...
48818c8428e29cb22bc60e41e86689d6d410066c6464a676e754b47aa8f49673
Python
45,279
1,078
import logging import vtk import numpy as np from ccf_streamlines.angle import find_closest_streamline from ccf_streamlines.coordinates import coordinates_to_voxels from neuron_morphology.transforms.affine_transform import ( rotation_from_angle, affine_from_transform_translation, affine_from_translation, Affi...
9ea7c8864652e1097d62f0c4fbb13a22d9f640948c88c63d5e5a57c1dfcd1226
Python
45,335
1,213
"""Observation models for simulations.""" from typing import Optional, Tuple, Union import numpy as np from osl_dynamics.utils import array_ops class MVN: """Class that generates data from a multivariate normal distribution. Parameters ---------- means : np.ndarray or str Mean vector for e...
9da638ba9b73491a8f51f7fee51b739048c3c7ef831b32cabfb9045390242ef8
Python
45,337
849
import itertools import math import pickle import importlib import brainscore import xarray as xr from PIL import Image from pixelmatch.contrib.PIL import pixelmatch from brainscore_core.supported_data_standards.brainio.assemblies import NeuroidAssembly from pathlib import Path import copy import numpy as np import...
3c08e6cafbd9c5be555b4f2b5f04dc6a8a59988dc1b3e74f54915e26df6f1594
Python
45,399
1,199
####################################################################################### ### Functions that serve to analyze the connectivity, early- and late-phase weights ### ### in a network that contains multiple cell assemblies ### ########################################################...
a25cab81ce4a5d4a2ece809fb3388f7826d9a9b48a4e71b43829c5f5bb3aee87
Python
45,403
1,199
####################################################################################### ### Functions that serve to analyze the connectivity, early- and late-phase weights ### ### in a network that contains multiple cell assemblies ### ########################################################...
13e341f94d6e2ebb17c433f063e4a29cbad6d018f4f710693f9e4d4579881063
Python
45,406
1,208
# Copyright (C) CVAT.ai Corporation # # SPDX-License-Identifier: MIT from __future__ import annotations import itertools import json from abc import ABC, abstractmethod from collections import Counter from collections.abc import Sequence from copy import deepcopy from typing import TYPE_CHECKING, Any, cast import at...
f4f9abb221849ae80c14961989f78f4393c24284aa77e1d81cec52876aeee456
Python
45,427
1,287
""" tensorflow/keras utilities for the neuron project If you use this code, please cite Dalca AV, Guttag J, Sabuncu MR Anatomical Priors in Convolutional Networks for Unsupervised Biomedical Segmentation, CVPR 2018 or for the transformation/interpolation related functions: Unsupervised Learning for Fast Probabilis...
e1f956b934bb862379040f60a8b3f42b61f9c90c60ce77a17feb788a0cb9e08d
Python
45,460
1,151
############################################################################# # Copyright (C) 2020-2026 MEmilio # # Authors: # # Contact: Martin J. Kuehn <Martin.Kuehn@DLR.de> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may...
e9a28f4ca67c8725a41e12a5d7e8a2dd6b6847e92b52ac3a7ce4620cbc6be3bb
Python
45,495
671
''' Aln ''' import numpy as np import sys def intro(): print(""" SHORT List of potential energy surfaces for Aln: P: potential energy, G: Gradient, D: Nonadiabatic coupling vector This is listed at the end of description to show the availability. For example: P/G means both potential energy and g...
2d778abe530d42de2a4cb1492a2d6c0631e7d1c0c7d1656bc47988b00c4e53e1
Python
45,551
1,092
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Mar 5 14:55:41 2019 @author: lferiani """ #%% import statements import re import cv2 import pdb import tables import itertools import numpy as np import pandas as pd import scipy.optimize from pathlib import Path from matplotlib import cm from matpl...
aeaee8623d1e6ba741cd8e8f46b08440427c3b1714996af9f1817105fa5ee163
Python
45,556
1,062
""" ProtoECGNet Fusion Inference Script This script provides standalone inference capabilities for trained ProtoECGNet fusion models that combine 1D rhythm, 2D partial morphology, and 2D global branches. Usage: python inference_fusion.py --target-ecg 65 # will do inference on only ECG 65 (ensure that you choose a...
fc135a6d4b7b783e0ff7e058dd1d460cb5880af1ee4b6b6d0923e6a7420557ce
Python
45,604
1,342
"""Processing functions for dannce.""" import numpy as np from skimage.color import rgb2gray from skimage.transform import downscale_local_mean as dsm import imageio import os import dannce.engine.serve_data_DANNCE as serve_data_DANNCE import PIL from six.moves import cPickle import scipy.io as sio from scipy.ndimage.f...
4a572054b13578735e48cb7a78c464abba8cb779ed170e6048ede68cee1d97bd
Python
45,699
1,177
# Copyright (C) 2020-2022 Intel Corporation # Copyright (C) CVAT.ai Corporation # # SPDX-License-Identifier: MIT import itertools import json import os.path as osp import tempfile import zipfile from io import BytesIO import datumaro import numpy as np from datumaro.components.annotation import Mask from datumaro.com...
223fa85b563cd5be3dc1b1a6f6323371cf15db6d8720e388f5c4a79dc60bc2b4
Python
45,713
830
""" Script to perform correlation analyses. Examples in run.py as run_corr_*(...) """ import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from joblib import Parallel, delayed import scipy from matplotlib.colors import TwoSlopeNorm from end2endPLS import PermutationGeneList, GeneListFromExpre...
86bf58c0e4f4349fae2aafd4b0cc06f850e103458566ec3513437a46781860cb
Python
45,826
1,226
# Copyright 2025 BrainX Ecosystem Limited. All Rights Reserved. # # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
35a861cd5de3a756362e6e909cde5ee56e6de84172529303dc18c66524ec2593
Python
45,837
801
"""Contains the tests for the REST server of ViRelAy.""" import glob import io import os import re import numpy from flask import Flask from flask.testing import FlaskClient from PIL import Image from virelay.server import format_exception, http_bad_request, http_not_found, http_ok, send_image_file NUMBER_OF_CLASSE...
f244c42dda70e3fbcaa52499c17f6024147509aa3ae0315f53534bdb4d13ea24
Python
45,889
1,144
from collections import defaultdict from itertools import count from operator import attrgetter from os import path as op import matplotlib.pyplot as plt import pandas as pd import numpy as np from tqdm import tqdm import pickle from ..exceptions import PipelineException try: import cv2 except ImportError: pr...
3894513071a07da447a4053b2d02693f4851577edfadc8f5aa1cf4892626e3aa
Python
45,980
1,229
from .trainer import * from flair.training_utils import store_teacher_predictions from flair.list_data import ListCorpus import math import random import pdb import copy from flair.datasets import CoupleDataset from ..custom_data_loader import ColumnDataLoader from torch.optim.adam import Adam import torch.nn.functiona...
4e13a2f538cf02ab56144eb2a91ca48a4024ce64faaae790ab9ff1c3f399b473
Python
46,028
6
standard_train_fold=['hh04W3xXa5s', 'GdFP_p4eQX0', '4iG0ffmnCOw', '81406', 'qyJiDgtj6YE', 'KI2sU-mhM44', 'qXisb7w9LjM', 'CLkTjujFVKU', 'aMtFBGh2wKI', '2OLVF-KEaZU', 'Or-9Nc_GAq8', '72tXTrSXoMk', 'hSgKOKK3L8M', 'YVHJpAROBvQ', 'pVzHaakhKAw', '127470', 'wY8JbFOsp5E', '-iRBcNs9oI8', 'sLaTZtL0ZIk', 'txjqbr6FoZs', 'jVayR0VCl...
dee3cee426eb79ffc4de7bc60b7cdf47f367f07bda61ccaec1ca6e53634e6dbd
Python
46,130
1,034
"""Top-level pipeline runner, orchestrating steps to mirror ``MEApipeline.m``.""" from __future__ import annotations import datetime import json import shutil import time from pathlib import Path from typing import Callable from meanap.params import ( GENERATE_CSV_STEP, PARAMS_FILENAME, Params, default_cache_dir...
4185374330f16192b7d513b49dc12a435400e18c35391fee1c484e6132fdbb3c
Python
46,182
1,165
# Copyright (C) CVAT.ai Corporation # # SPDX-License-Identifier: MIT from __future__ import annotations import itertools import math from collections.abc import Callable, Sequence from functools import partial from typing import Any, NamedTuple, TypeAlias, TypedDict, TypeVar, cast import datumaro as dm import datuma...
425fa4a5aab889020ebd8126dd2c970f5c6bde02b09edc3520d6e8b3a799bab2
Python
46,231
957
import torch import datajoint as dj from featurevis import models from featurevis import ops from featurevis import utils import featurevis from staticnet_analyses import multi_mei from staticnet_experiments import configs from staticnet_experiments import models as static_models schema = dj.schema('neurostatic_cros...
beedd563f516bf1773d77cc39638dfd57cba56128c59523a50235624ee30c947
Python
46,264
1,048
"""Can genotype or age be read back out of the features? — ports ``doClassification.m`` and ``doLDA.m``. MATLAB fits five classifiers, cross-validates each, shuffles each feature in turn to rank importance, and shuffles the labels 200 times to get a null. The structure is kept. What changes is who is allowed to be in ...
3420c17c0326b93e1ed6a8dba509c7d62315f09df5d6faa7355f0094c2cf98fe
Python
46,376
1,022
# coding=utf-8 # Copyright 2022 the HuggingFace Datasets Authors. # # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
f87207ddde5675c771f7c64c220fd3333ec02a048ff68ffbd2d37ea9081c59a2
Python
46,401
1,302
# Kai Sandbrink # 2023-05-09 # This script shows # %% LIBRARY IMPORT import numpy as np import ast, glob from matplotlib.ticker import FuncFormatter import matplotlib.pyplot as plt from utils import format_axis import pandas as pd import os from scipy import stats from utils import Config # %% PLOTTING FUNCTIONS d...
4fed753d8811d8d30c7047cc552feacdb9975bd8fb672589efce89b1d34e1561
Python
46,419
1,451
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
5e5a50fb2fa1ac03f8ec7306f1b2276eaea6e0a59684f597f6b94d05c495f887
Python
46,469
1,096
#!/usr/bin/env python3 """ graphpancake: electronic structure theory-based molecular graphs, because computers haven't taken organic chemistry class Usage: graphpancake <command> [options] Commands: create-db Create a new molecular graph database load-data Load QM data for a single molecule quer...
0508f1657243f60d2ec2f403d8541f73615a66e5de311cfc7d1e1dde8dbe0c34
Python
46,517
1,026
"""LAION-fMRI Brain-Score benchmark. Wraps the LAION-fMRI 7T volumetric dataset (Zerbe et al., VSS 2026) using the bundled re:vision train/test splits (`tau`, `ood`, `cluster_k5_*`, plus per-OOD-category sub-variants) on the Allen2022-style **shared pool** (1,492 stimuli seen by every subject). Mirrors `Hebart2023_fmr...
f4a66a80c24ea959a5bb5eba562b5d2fca9538dd672739640f457b977af70099
Python
46,557
803
# Copyright (c) 2026 Rohit Jena. All rights reserved. # # This file is part of FireANTs, distributed under the terms of # the FireANTs License version 1.0. A copy of the license can be found # in the LICENSE file at the root of this repository. # # IMPORTANT: This code is part of FireANTs and its use, reproduction, or ...
1e9d450faa6647b4ef797e011940ace4b942e05a37d53db1e7c7890e28d4a729
Python
46,562
1,305
__all__ = ["IntervalArray", "EpochArray", "SpaceArray"] import copy import logging import numbers from sys import float_info import numpy as np from numba import jit from .. import formatters, utils, version from ..utils_.decorators import keyword_equivalence #######################################################...
469b751d94692223cbd37edac3e73c06c3be4212c55dd634295abc21fac11a16
Python
46,674
1,193
# -*- coding: utf-8 -*- """ Landmark Transform Pipeline for 3D Slicer A modular, open-access tool for transforming anatomical landmarks and segmentations from template space to subject space using ANTs registrations. Features: - Cross-platform path handling (Windows/Mac/Linux) - Configurable via YAML or CLI - R...
dd04e1a04d7373a865c178ff3850bcc03b9edd2411017f3efb7de74c42bf79e1
Python
46,694
1,318
# Copyright 2024 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...
f867d8142ab56e1fed0ec4efe0d5c07b575a287a1b07ddb7e630f80d1dd90a97
Python
46,694
960
from qtpy.QtCore import Signal from pathlib import Path from napari import Viewer from napari.qt.threading import thread_worker from natsort import natsorted import cv2 from superqt import QCollapsible from qtpy.QtWidgets import QPushButton, QWidget, QVBoxLayout, QMessageBox, QProgressBar from magicgui import magicgui ...
6bbbef3992bbf2a240387d36ba020fa4c03efaede87efe704a95867746566088
Python
46,715
977
import random from math import cos, radians, sin, sqrt import numpy as np from gym import spaces from utils import * if __name__ == "__main__": # pretend to overload the memory import pygame class Molecule: def __init__(self, position=(0, 0), shape='square', size = 140, state=0, angle=0): ...
5e7feef88337cee668fbad665b2d489894cde44e73af414dc26dc27e8e7f8655
Python
46,783
1,403
import re import sys import argparse import asyncio import typing import json import bisect import time import datetime import copy import dataclasses import grpc import numpy import scipy.spatial.transform import scipy.optimize from thalamus.qt import * from thalamus import thalamus_pb2 from thalamus import thalamu...
f9aa7bde9872b52676720f62e05f876c0c939053aa812ab96ff47d6231846877
Python
46,789
1,290
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
ee49f411a88060f82e79b604122b6e90b914df911292ffb128a53df61fbd4e76
Python
46,855
907
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import torch import torch.distributed import torch.nn.functional as F from torch.nn.init import trunc_normal_ from .sam....
5a9219d10908f3bb61beb2e5952e4bcd40cef96209d48d595d1cdc6a4b2cd05a
Python
47,040
862
import datajoint as dj import featurevis import numpy as np import itertools from functools import partial from itertools import product, repeat from tqdm import tqdm import torch from torch import nn from torch.nn import functional as F import random import os from staticnet_invariance.toy import ToyNeuron, GroupAss...
5537124c5530c513f71987c67ef7f0fe2cba27020d1a0ceddd01666b1480924e
Python
47,170
739
SYSTEM_PROMPT_FINDINGS_CHINESE = """系统角色: 你是一名顶级的医学影像报告(MRI脑部)AI助手,专门负责将非结构化的MRI报告文本,按照预设规则和标准,转化为结构化、标准化的数据。 核心任务: 对输入的MRI脑部检查报告进行深度清理、信息提取、特征增强及标准化输出。 I. 标准化疾病列表 (共16类 + 肿瘤亚型): 结论必须严格从以下列表中选择。若原始报告提及的疾病不在列表内,则不予采纳或尝试映射到最接近的类别(需谨慎)。 1. 正常 2. 白质高信号("缺血灶"、"脑白质变性"映射至此) 3. 脑萎缩(特别注意:原始报告中出现的"老年脑"、"脑实质老年性改变"或类似描述年龄相关性脑改...
67672dff390e7be173e1987c1948944e962e26bf1992ea60ce201ee63b821e70
Python
47,223
1,204
#!/usr/bin/env python # author: Jannes Spangenberg # e-mail: jannes.spangenberg@uni-jena.de # github: https://github.com/JannesSP # website: https://jannessp.github.io import os import h5py import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import multiprocessing as mp from ar...
2d1a6ce4c6eb402c2fb2978b7a3841c3403c092930a558b76012d1df0cc3da0c
Python
47,255
1,156
import cv2 import numpy as np import csv import os import glob from ultralytics import YOLO import configparser import time import shutil import tkinter as tk from tkinter import messagebox, filedialog import subprocess # ~ import config_watcher import sys import box_geometry as bg from kalman_tracker import KalmanTrac...
94df07d18da6a942b07446e36ed064e801e7fa22937fab470d422ab740988586
Python
47,310
1,260
# Copyright (C) CVAT.ai Corporation # # SPDX-License-Identifier: MIT import json from http import HTTPStatus from time import sleep, time import pytest from deepdiff import DeepDiff from shared.fixtures.data import Container from shared.fixtures.init import CVAT_DB_DIR, CVAT_ROOT_DIR, container_exec_cvat from shared...
55ba9cb7687f57be12614989058834a0024dad4c194200f8bd075bc8357c278e
Python
47,346
1,298
# -*- coding: utf-8 -*- import argparse import json import logging import os import multiprocessing import re import shutil import sys import xml.etree.ElementTree as ET import nibabel as nib import numpy as np from dipy.data import SPHERE_FILES from dipy.io.stateful_tractogram import Origin, Space from dipy.io.util...
cb4472bfb389e7b3d136d29a4c90d324bbde67e6144db7c0c752775be42ab5a2
Python
47,358
1,487
"""CLI tests for the long-lived main-agent workflow.""" import importlib from types import SimpleNamespace import pytest import toml from chemgraph.agent.main_session import MainAgentTurnResult, PendingInterrupt from chemgraph.cli import commands from chemgraph.cli.formatting import console from chemgraph.memory.sch...
807b05daba593e5788691c64297b0e8b1d34821371ae8a76f14da125de3fa1cc
Python
47,453
1,558
import logging import dipy.core.gradients as dpg import dipy.reconst.dki as dpy_dki import dipy.reconst.dti as dpy_dti import dipy.reconst.fwdti as dpy_fwdti import dipy.reconst.msdki as dpy_msdki import immlib import nibabel as nib import numpy as np from dipy.align import resample from dipy.data import get_sphere fr...
51b2a64cf807f47ca5485a059848014a8ee72260ae92ffae7036a0331cd6ea70
Python
47,460
722
import h5py as h5 import numpy as np import sys import ArgParser as argp from scipy.signal import find_peaks import PatchAnalPlots as pu import spike_utilities as su HEADSTAGE_V={'H1':'_S2_', 'H2':'_S4_'} HV_VAL_KEY={v:k for k,v in HEADSTAGE_V.items()} HEADSTAGE_I={'H1':'_S1_', 'H2':'_S3_'} CURRENT_THRESH=5e-12 #det...
e0c3f370c387d7b2378849feb15e8bb8f3ac77c1d1a86474f4e2fff45e59ab14
Python
47,572
1,236
#!/usr/bin/env python3 """ Batch Hyperparameter Optimization Script Submits multiple hyperparameter optimization jobs with different combinations of: - Model types (RandomForest, XGBoost, LightGBM, EBM) - Optimization metrics (precision, recall, f1, roc_auc, pr_auc) - Various parameter combinations Based on the hyper...
5a0f9bff065930abca35c22b233905f031d1c07e63e3a9edba747e3b200b71db
Python
47,581
701
import os class CactiConfig: def __init__(self): # content = f.readlines() # self.baseline_config = ['# power gating\n', # '-Array Power Gating - "false"\n', # '-WL Power Gating - "false"\n', # '-CL Po...
7a8812010467429b0b31707e757c2818ed1e1cd09bf5a89c9525db8641146073
Python
47,590
1,205
#!/usr/bin/env python # author: Jannes Spangenberg # e-mail: jannes.spangenberg@uni-jena.de # github: https://github.com/JannesSP # website: https://jannessp.github.io import os import h5py import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import multiprocessing as mp import ...
97e64356903c3d8f7d570d71bba8ba39d083e0b4ec90f364d037e1610e56dc86
Python
47,605
1,205
#!/usr/bin/env python # author: Jannes Spangenberg # github: https://github.com/JannesSP # website: https://jannessp.github.io import os import h5py import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import multiprocessing as mp import sys from argparse import ArgumentDefaults...
73f5afd75a6ceeb83a8d8498419338b6f3308e18d6d7f48405ce044bbc6cdd01
Python
47,659
1,046
import sys import os import json import shutil import random from PyQt5.QtWidgets import (QApplication, QGroupBox, QWidget, QLineEdit, QPushButton, QVBoxLayout, QFileDialog, QProgressBar, QCheckBox, QHBoxLayout, QMessageBox, QSpinBox, QDialog, QFormLayout, QDialogButtonBox, QLabel, QStackedWidget) from PyQt5.QtCo...
9fd567e4a1d2f14c21e62907701e4b377b1efafa2819bf97753ce9c979868dd5
Python
47,709
1,262
import logging import numpy as np import matplotlib.pyplot as plt import matplotlib.patches as patches from scipy.ndimage import zoom, gaussian_filter import scipy from .base import Model from nems.registry import layer from nems.layers.tools import require_shape, pop_shape from nems.layers import ( WeightChannel...
0f8ce9a7257d3b9ad041d43f130b3999f4114e1b456bc4e41152e888c4e15e22
Python
47,740
1,028
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license from __future__ import annotations import os import random import subprocess import time import zipfile from pathlib import Path from tarfile import is_tarfile from typing import Any from uuid import uuid4 import cv2 import numpy as np from PIL impo...
f1e78876d3f56219fdc209624c1553894d8b370e0a5fc5c453c9210c6b80258e
Python
47,794
1,041
from collections import defaultdict import warnings import pandas as pd import numpy as np import scipy as sp from scipy.stats import binomtest, beta from scipy.optimize import curve_fit from matplotlib import pyplot as plt from sklearn.linear_model import HuberRegressor from .utils import neighbors as nb from .ut...
7456269f5fc5a89cd164a65fb9916538ed1fda41575076cf9def26fcbe30f453
Python
47,839
1,214
import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), '..')) import json import torch import torch.nn as nn import pandas as pd import numpy as np import matplotlib.pyplot as plt from functools import partial from .modules import ( optimizers_dict, MultiPropDecoder, activation_dict ) ...
f752a15ce52c86de519f1ac78d36a127879ebd17b344872695f4792307553529
Python
47,875
1,186
import math import pathlib import typing import numpy as np from matplotlib import pyplot, pyplot as plt from matplotlib.lines import Line2D from neuron import h, nrn import numpy.typing as npt from scipy.linalg import svd from scipy.spatial.transform import Rotation from neuron.units import um from .. import cells f...
ab42f76c437212fa3f0462cfc193d5ce1ef7d006a4eac43bc97a1ac0f80cef61
Python
47,982
1,186
import copy import re import warnings from collections import defaultdict, namedtuple from collections.abc import Mapping from itertools import chain from typing import Any, Dict, List, NamedTuple, Optional, Tuple, Union import torch from torch import Tensor from typing_extensions import Self from torch_geometric imp...
f8cbce853853f77815370d4c62b1f5c8bd6d6a43cbfb8be34c9c11c47ada1854
Python
47,990
928
from napari import Viewer from napari.qt.threading import thread_worker from natsort import natsorted import cv2 from napari_dmc_brainmap.utils import get_info, load_params from superqt import QCollapsible from qtpy.QtWidgets import QPushButton, QWidget, QVBoxLayout from magicgui import magicgui from magicgui.widgets i...
dd6b40884ba70725ff0df11edc7a7b1c5096b3ee4cd0d27c98c9a4e80276c124
Python
48,346
640
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Feb 11 14:26:32 2020 This is a pytorch implementation of the Tolman-Eichenbaum Machine, written by Jacob Bakermans after the original by James Whittington. The referenced paper is the bioRxiv publication at https://www.biorxiv.org/content/10.1101/770495...
b60d6227d886b055a1e55e8dd215f19773df6f9745cbea531768296e97a7c77b
Python
48,428
932
import warnings import numpy as np import scipy from matplotlib.widgets import Button from mpl_toolkits.axes_grid1 import make_axes_locatable from numpy.typing import NDArray from typing import Tuple from helper_functions.load_cell_distributions import compute_distribution from helper_functions.cell_type_lib import Ce...
63fb512ff51efc088c384ce6432b8cc035af02e54c08e834b022235ddd773c9a
Python
48,498
1,057
""" This file contains all the utilities used in that project. They are classified in 5 categories: 1- loading/saving functions: -load_volume -save_volume -get_volume_info -get_list_labels -load_array_if_path -write_pickle -read_pickle -write_model_summary 2- reformatting functions -...
7de6061d09d7ff76b3b4fc504b0659c819cf458a9d217063b5b2df94bd7691c9
Python
48,498
1,410
# Copyright (C) CVAT.ai Corporation # # SPDX-License-Identifier: MIT import io import math from logging import Logger from pathlib import Path from types import SimpleNamespace as namespace import cvat_sdk.auto_annotation as cvataa import PIL.Image import pytest from cvat_sdk import Client, models from cvat_sdk.attri...
8ae2a2658b8d56b1273bb241c4ad2b5a005d12d81942ed8abf23a1b26f0f79d1
Python
48,524
990
import numpy as np import warnings from collections import defaultdict import pandas as pd from scipy.spatial import KDTree import skimage.morphology as skim from .utils import neighbors as nb from .utils import util as util import network_flow_tracker.LFBFP as LFBFP import trackpy as tp from trackpy import linking ...
66fc3d7df87b338560fef36e26f6bba796635ffaf0672bf44d783daf858b8106
Python
48,640
1,136
#!/usr/bin/env python3 """ chemembed_by_file.py — ChemEmbed annotation module (FAISS GPU edition) ========================================================================= Iterates over all samples, reads the GNPS/SIRIUS MGF file from each sample's polarity folder, and produces ChemEmbed predictions. Speed improveme...
8c5ee88132768ba3f3f85e259535f40e7a194b8e83414f8a17a566a98795ab63
Python
48,685
1,225
# Copyright 2024 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, ...
a573c6c3c4e9ae471c1f6ec0f192d4d49f7ce836eab5fba4eb617deff8c8b466
Python
48,691
1,027
import os.path import unittest import tests.base_test import tests.output_parser as output_parser import tests.test_config import tests.util class Test(tests.base_test.BaseTest): def setUp(self): super().setUp() self._test_base_dir = tests.test_config.TEST_BASE_DIR self._test_dir = os.pa...
8abee51ec8d6f04b0b7b451c451ab54d39175b0f1a22510cc7d97ad22064f50b
Python
48,705
884
############################################################################################ ### Functions to analyze and plot weight and activity distributions from simulation data ### ############################################################################################ ### Copyright 2019-2022 Jannik Luboe...
fc5a2d1dd9bd78fa8946ee4e3300d21f4c82096729a07c6be8dbc854e255b221
Python
48,706
884
############################################################################################ ### Functions to analyze and plot weight and activity distributions from simulation data ### ############################################################################################ ### Copyright 2019-2022 Jannik Luboe...
4815f8d06646fd31b9ad7a6a004fe58b1128ceef7f477c989096cdd698df2289
Python
48,848
974
#! /usr/bin/env python """Script to generate all the plots and statistics for the mitochondria ultrastructure analysis in the surface morphometrics paper.""" __author__ = "Benjamin Barad" __email__ = "benjamin.barad@gmail.com" __license__ = "GPLv3" import os import pickle import numpy as np import time from morphom...
12ec75c5463ce1089bc629b6a869cde6e78f4c1a129627e97ce772a2431839d2
Python
48,870
1,245
# Copyright (c) DP Technology. # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Train a network across multiple GPUs. """ import contextlib import logging import os import sys import tim...
74c93b299dc5973c343c2ee422e690a11083bd8b7dc86c4e9fa7d23107732012
Python
48,875
1,196
import datetime import logging import os import struct from abc import ABC, abstractmethod from pathlib import Path from typing import Any, Optional, Tuple, Union import numpy as np import pandas as pd import pyproj from pyproj import CRS, Transformer from . import _core as backend logger = logging.getLogger("pyocto...
ed372b71304b4ba18dcf3af450624e6a6e82564d58e3158f72cf7047d41a1879
Python
48,891
1,336
import glob import os import tarfile from collections import defaultdict from typing import Callable, Dict, List, Optional, Tuple, Union import ngs_tools as ngs import pandas as pd from .config import get_kallisto_binary_path from .logging import logger from .utils import ( concatenate_files, decompress_gzip,...
10040dbbc870797b34cfc5fca15e057b74c66e95ab22ed426e7eaebd71d5891b
Python
48,908
1,710
# Copyright 2019 Calico 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, ...
c3b930a4ed22698a2e0e6b03612ef8a17dedd8fbad78d9333da861982ae2697b
Python
48,983
1,035
"""The catalogue of step-5 figures, and how to draw one from stored results. Three places need to draw these figures: the step itself (:mod:`meanap.stats.run`), the bundle exporter, and the viewer. Left to themselves each would carry its own list of which figures exist and how each is made, and the three lists would d...
579dfc93a6117617192f44654723507ea863f21f49260364bdb6fef76b823df6
Python
49,005
1,545
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the PyMVPA package for the # copyright and license terms. # ### ### ### ### ###...
c2d3a2dccb51998f7ace7b02df2742f4f28df6ae70b84994c4acfbeea8a41b70
Python
49,051
1,515
"""Define networks for dannce.""" from tensorflow.keras.models import Model, load_model from tensorflow.keras.layers import Input, concatenate, Conv2D, MaxPooling2D from tensorflow.keras.layers import Conv2DTranspose, Conv3D, Lambda from tensorflow.keras.layers import MaxPooling3D, Conv3DTranspose from tensorflow.keras...
7ae8f6a6c957cc69cc86b9701835706588c80ff85a02898f613547953eb1641a
Python
49,069
1,237
# Copyright (C) 2019-2022 Intel Corporation # Copyright (C) CVAT.ai Corporation # # SPDX-License-Identifier: MIT import heapq import math from collections.abc import Callable, Container, Generator, Iterable, Iterator, Sequence from copy import copy, deepcopy from itertools import chain from typing import Any import n...
3960bde703c0653ae4a657e37fa1b5572e2cc628bb192f6de06a3b207856a8b4
Python
49,164
1,405
"""Maxfiltering. This module wraps the Elekta Maxfilter command-line tool for applying Signal Space Separation (SSS) and temporal SSS (tSSS) to MEG data. Note ---- This module requires a licensed installation of Elekta/MEGIN MaxFilter. MaxFilter is proprietary software and is not included with osl-dynamics. **OHBA u...
f6b32c075d006d6ca2649c61d937c24d923331d6e85f19b478f47dab797b13cb
Python
49,183
1,141
import copy import gzip import logging import os import pickle import numpy as np import pandas as pd from joblib import Parallel, delayed from pingouin import compute_effsize from tqdm.auto import tqdm from .datasets import get_template from .io import get_input_data from .nulls import generate_null_maps from .stat...
67d40ba1d1676c382700cb812143efd47f76c59a08499acc6148b904238625f0
Python
49,270
1,160
import os import subprocess import shutil import nibabel as nib import numpy as np import pandas as pd from nipype.interfaces.base import BaseInterface, BaseInterfaceInputSpec, TraitedSpec, File, Directory, traits, CommandLineInputSpec, File, TraitedSpec, CommandLine, Directory from nipype.interfaces.utility import Ide...
b7c99a34964675314aa17974167f7cae2c4daf3d1263db4cc6be2a886d5e0795
Python
49,282
1,364
# import modules import pandas as pd import os from pyliftover import LiftOver import numpy as np from sys import argv import sys import time import Query_api import subprocess import tempfile # disable pandas helper messages pd.options.mode.chained_assignment = None # default='warn' ### Define helper functions # ...
8d3a67064624fe081d44ed5c3baf3590d43052ed710039b15689291670bf6059
Python
49,292
1,354
#!/usr/bin/env python # -*- coding : utf-8 -*- """Utilities for running various MRtrix3's DWI preprocessing tools""" import os import os.path as op import subprocess from shutil import copyfile, which import numpy as np from ..preprocessing import mrinfoutil, rician, smoothing from ..system.errors import MRTrixErro...
cc7704a22a0bafd95e3c981b9ec472e2096937b17f0be7c4a7dcc10e820269a2
Python
49,356
1,133
# Dataset utils and dataloaders import glob import logging import math import os import random import shutil import time from itertools import repeat from multiprocessing.pool import ThreadPool from pathlib import Path from threading import Thread import cv2 import numpy as np import torch import torch.nn.functional ...
29bc9c67519899baddc62f54392d47cad31d8cd2c170bea9ca7ce785c8c27c28
Python
49,395
1,480
# imagecodecs.py # Copyright (c) 2008-2026, Christoph Gohlke # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # thi...