sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
f0a993ae088d5edc39739ba3b321e85414246b709a36703fcdc6ee086771526d
Python
42,045
1,072
"""A comprehensive logging system. Managing experimental data, database connections, and data flow control in an experimental setup. It includes functionality for establishing database connections, managing logging sessions, handling data insertion, and synchronizing setup status. Classes: Logger: Manages logging...
8ca24aece5ab8f4ab792c6d8173452ea0bf8b8360614c454e980b716697151a3
Python
42,225
869
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2016 David Emms # # This program (OrthoFinder) is distributed under the terms of the GNU General Public License v3 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publish...
673be91716415e9799ac8155f5aaadc15a9ae8edf3ff95af51179638787e692e
Python
42,256
962
""" Tools for retrieving gene information using the UniProt API and NCBI Entrez. """ from typing import Dict, List, Optional, Tuple, Any from pydantic import BaseModel, Field import re import openai import time import threading import json import os import datetime import logging from pydantic_ai import RunContext, Mo...
493ccf9f27661bea1236d9acef81dd58f22dc2ab2509a699399c4fd9cae3e922
Python
42,337
939
#!/usr/bin/env python from __future__ import division from __future__ import print_function from builtins import map from builtins import input from builtins import range from numpy import * import os from sys import argv,exit import forcebalance from forcebalance.PT import PeriodicTable from forcebalance.nifty import...
725e31f512ddc3564cb4411bbcac00b17f8877701d2233b95371daa0a33a546b
Python
42,350
2,050
# This file is automatically generated by tools/idna-data __version__ = '13.0.0' scripts = { 'Greek': ( 0x37000000374, 0x37500000378, 0x37a0000037e, 0x37f00000380, 0x38400000385, 0x38600000387, 0x3880000038b, 0x38c0000038d, 0x38e000003a2, ...
41565bdb2a608535c5bb3ce9ef9dcadf81f229410058232f01e6120682db0e59
Python
42,374
1,115
# -*- coding: utf-8 -*- __all__ = ['Distribution'] import io import sys import re import os import warnings import numbers import distutils.log import distutils.core import distutils.cmd import distutils.dist import distutils.command from distutils.util import strtobool from distutils.debug import DEBUG from distutils...
6bd9b81a664e38e16618d023f1db7c0848925a2e7c534a1a44ba5427f94d55bd
Python
42,450
937
"""Tracking data generators.""" import numpy as np from skimage.measure import regionprops from skimage.transform import resize from tensorflow.keras import backend as K from tensorflow.python.platform import tf_logging as logging from tensorflow.keras.preprocessing.image import Iterator from tensorflow.keras.prepro...
51edf36ee10648e4d3b809d8bdb987c54260f1ec923622f0bfb99611328a42bf
Python
42,517
1,011
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ================================================================================ Reproducible Analysis Script Effects of Transcranial Direct Current Stimulation over the Left Sensorimotor Cortex on Bimanual Force Control: A Computational and Experimental Invest...
02d8c5d6374fadc99699d404722e325b18948d074bfbb2af48f6ab9019133023
Python
42,521
1,391
"""Predicates for spatial analysis.""" import warnings import numpy as np from shapely import lib from shapely.decorators import requires_geos __all__ = [ "contains", "contains_properly", "contains_xy", "covered_by", "covers", "crosses", "disjoint", "dwithin", "equals", "equa...
64d5dea08bfb98d0dda8673dd49f96033cdb1829c5a0096e8abd481ac141065b
Python
42,528
965
""" CNN Classification Pipeline — Banking Customer Interaction ========================================================== Three models trained on 64×64 grayscale images: Model 1 : Plain CNN (baseline) Model 2 : CNN + SE Channel Attention Model 3 : RDAD-CNN — Residual Dual-Attention Depthwise-Separable (Nove...
5be34df76fb5be780e2854e6eb606e8efde3633cae97dcf18dc0538c10acc9b3
Python
42,595
1,124
# This code is part of OpenFE and is licensed under the MIT license. # For details, see https://github.com/OpenFreeEnergy/openfe """OpenMM MD Protocol --- :mod:`openfe.protocols.openmm_md.plain_md_methods` =========================================================================================== This module implemen...
9da4b35310738a71a360185e668dc8cb47e96d79b131983d1c00053669b95bbb
Python
42,630
921
import argparse import os import numpy as np import pandas as pd import torch import torch.nn as nn import matplotlib.pyplot as plt import pickle from captum.attr import DeepLift from model_genomic import SNN from dataset_survival import RNAseqSurvivalDataset from scipy.stats import ttest_1samp, pearsonr, spearmanr fro...
de875cfe5d36c75980523edca1a5c47b5e8f44077c6b5c894f2c5e6985277590
Python
42,633
1,126
"""Core experiment module for experiment control. This module provides the base classes and functionality for running behavioral experiments. It includes: - State machine implementation for experiment flow control - Condition management and randomization - Trial preparation and execution - Performance tracking and ana...
d342b7defd0511b84fd2835210edec9a5262579b0e15fe3d95e832f0d6e5e7a2
Python
42,839
987
"""Core MultiQC module to parse output from custom script output""" import base64 import json import logging import os import re from collections import defaultdict from io import BufferedReader from typing import Any, Dict, List, Mapping, Optional, Set, Tuple, TypedDict, TypeVar, Union, cast import markdown import y...
28a904e7da7d784d65d3006381480ca500c3f5c9c782d05fbf7a7a54772729e0
Python
42,913
932
import shap print(shap.__version__) import argparse import torch import torch.nn as nn import numpy as np import pandas as pd import os import matplotlib.pyplot as plt import pickle from model_genomic import SNN from dataset_survival import RNAseqSurvivalDataset from scipy.stats import mannwhitneyu, pearsonr, spearmanr...
41160087caedf4939d6f3e19965c425f24e65c891662cf5faf2685345986ffb0
Python
42,920
945
import argparse import os import numpy as np import pandas as pd import torch import torch.nn as nn import matplotlib.pyplot as plt import pickle from captum.attr import IntegratedGradients from model_risk import SNN_RISK from dataset_survival import RNAseqSurvivalDataset from scipy.stats import ttest_1samp, pearsonr, ...
576e153cc7c84264ae907e83f0d90a816f240e983b9c80c2097b66b27fac4d38
Python
43,263
785
import os import geojson from shapely.geometry import shape from shapely import affinity import rasterio from rasterio.transform import from_origin from rasterio.features import rasterize from rasterio.transform import Affine # Import Affine directly import numpy as np import scipy.ndimage as ndi from skimage import fi...
acf6207ad0d188ac188962b6f7df5356a47452eba9902fbf8b03fa29bfaaf9d0
Python
43,331
1,034
import gc import os import random from pathlib import Path from typing import Dict, Optional, Tuple, Union, List import numpy as np import polars as pl import pydicom import time import torch import torch.nn as nn import torch.optim as optim from torch.utils.checkpoint import checkpoint from torch.utils.data import Da...
3ad328f32b686f9f2d1bd7038573077277fb42a7f9de8c39ce32ba777a60c591
Python
43,366
1,105
""" FEMap ===== The workhorse of cinnabar, a :class:`FEMap` contains many measurements of free energy differences, both relative and absolute, which form an interconnected "network" of values. """ import copy import itertools import math import pathlib import warnings from dataclasses import asdict from typing import...
6e3fb92879b55e01d9b67b761bf54e9283a4e143d7b9cf6aafd5e0bd50d09142
Python
43,379
1,139
import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl import seaborn as sns from scipy.signal import detrend import fathon from fathon import fathonUtils as fu import neurokit2 as nk from scipy.stats import wasserstein_distance, mannwhitneyu class ComplexityFidelity: """ A class for comp...
07d42618bdcb8572650fab8f378250737e741cf33c65f7fd7906482fcad2b95e
Python
43,537
966
import argparse import os import numpy as np import pandas as pd import torch import torch.nn as nn import matplotlib.pyplot as plt import pickle from model_genomic import SNN from dataset_survival import RNAseqSurvivalDataset from scipy.stats import ttest_1samp, pearsonr, spearmanr from statsmodels.stats.multitest imp...
22d7ed6d5584fc6a998395b0b0d3bb9ac9eebc8a4e939da9c65b4ea96c1dc48b
Python
43,623
1,117
from typing import Any, Iterable, Mapping, Sequence, Tuple, Union, Optional, Callable, Literal, List import math import numpy as np import pandas as pd import scanpy as sc import anndata import scipy import umap from sklearn.preprocessing import LabelEncoder, MinMaxScaler from sklearn.metrics import confusion_...
e48b6a736cb29e1401a25db05c4d95f99174062bfc55a7a1841121f11586b2d1
Python
43,688
1,200
import logging import os import warnings from functools import wraps import numpy as np # Optimize imported here and below as the jax-optimized one is jax or passthrough, but this is required regardless import scipy.optimize from pymbar.utils import ensure_type, check_w_normalized, ParameterError logger = logging.ge...
1312514268243f78a7cd2b8308942c0f026226e60b2eca4b849e3a302009de30
Python
44,004
802
# -*- coding: utf-8 -*- import glob, os, shutil, json, scipy, math import nibabel as nib import numpy as np import pingouin as pg import pandas as pd import brsc_utils as util # Time computation libraries from joblib import Parallel, delayed import time from tqdm import tqdm # Nilearn library from nilearn.maskers imp...
de5591efdbdf268a2ed19e67312102768d69ba05311e468937c18019ec60c084
Python
44,004
1,310
"""Class to retrieve and explore the LEiDA results.""" import numpy as np import pandas as pd import os from itertools import combinations import matplotlib.pyplot as plt import seaborn as sns from .data_utils import ( load_rois_labels, load_rois_coordinates, load_tseries, load_classes ) from .data_u...
2f0977ff12ef6f56e56308ee331e94d22da44baaa89181077db4db20521d2ab7
Python
44,012
1,160
#!/usr/bin/env python3 """ 生物学合理性可视化 展示不同XAI方法的整体生物学合理性,包括: 1. 箱线图(6种XAI方法比较) 2. 箱线图(3种XAI类别比较) 3. 热力图(数据库×XAI) 4. 热力图(癌种×XAI) 使用方法: python 03_visualize_and_test.py """ import sys import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from pathlib import Path from scipy.stat...
c4847b2fa60b666029486446c3bfc0d310dea4cf9543fdd1f38d8b81a6325468
Python
44,150
961
import numpy as np import matplotlib.pyplot as plt from scipy.fft import fft, ifft, next_fast_len from skimage.metrics import structural_similarity as ssim, mean_squared_error from sklearn.metrics.pairwise import cosine_similarity from scipy.stats import mannwhitneyu, wilcoxon try: from tqdm import tqdm except Imp...
7c8e507b441853f8147bc8d214208b8b43976e4735cf5dd09af02604950f8f58
Python
44,481
957
import pandas as pd import numpy as np import glob, os, yaml, itertools, sys, sparse from Bio import SeqIO from Bio.Seq import Seq import Bio.SeqUtils import Bio.Data import warnings warnings.filterwarnings("ignore") from data_utils import * data_utils_dir = "./data_processing/data_utils" # import reference files h3...
cf81bc9d125e9114df72a3e13b9b791237a98a9d0ebddad123ab2527754e6109
Python
44,715
1,439
# sketch of what it should actually do: ''' generator produced 500 samples of which I stored the max eigenvalues and the unscaled parameters as well as scaled parameters. Lets call this unscaled batch M. From the scaled M* we calculated eigenvalues and looked at its distribution (which we call prior distribution of e...
d7cd8a1b118b285930bb8e483afa76a8289051b3a02d7d046e1421014d05f35e
Python
44,719
866
import argparse import torch import numpy as np import os import torch.autograd as autograd import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torchvision import torchvision.transforms as transforms from dataset import CreateDatasetSynthesis from torch.multiprocessing import ...
94adec2ca79d68a511d1e9e7581d7bf7d312641fc9462e8f75a875c0008a1500
Python
45,061
840
""" @package forcebalance.lipid Matching of lipid bulk properties. Under development. author Lee-Ping Wang @date 04/2012 """ from __future__ import division from __future__ import print_function from builtins import str from builtins import zip from builtins import map from builtins import range import abc import os...
f8ee3f66fff0ee99d9dfbd1ad66f01273f8718fc890ef3f475a273db5d87f816
Python
45,101
960
# -*-coding:utf-8 -*- import torch from torch import nn from typing import Callable, Dict, List, Tuple import warnings import functools from functools import partial import torch.nn.functional as F import transformers transformers.logging.set_verbosity_error() from modules.fusion_modules import FusionTransformer from ...
ba28a79a0a7113dffee70e240752528313a64531b6026dcf3c4736e9cd748f14
Python
45,163
978
import argparse import os import numpy as np import pandas as pd import torch import matplotlib.pyplot as plt import pickle from lifelines.utils import concordance_index from model_genomic import SNN from dataset_survival import RNAseqSurvivalDataset from scipy.stats import mannwhitneyu, pearsonr, spearmanr from statsm...
3c36651a36b86c7b16cca0b30b5770b755b30e2fd477f00105466de965b87260
Python
45,184
1,025
import itertools import json import logging import os import re from collections import defaultdict from typing import Dict import numpy as np from multiqc.base_module import BaseMultiqcModule, ModuleNoSamplesFound from multiqc.plots import bargraph, linegraph, table log = logging.getLogger(__name__) # A 64 color p...
aa99deed0f6a13de5c6dcc9ae6ad07544583fed89ff16b2a7f91fdcf355a57cd
Python
45,321
1,024
""" twinc_network.py Author: Anupama Jha <anupamaj@uw.edu> TwinC classification model architecture. """ import torch import numpy as np from twinc_utils import count_pos_neg, decode_chrome_order_dict, decode_list from sklearn.metrics import roc_curve, roc_auc_score, average_precision_score, precision_recall_curve de...
88075a7d3d24ad7e108c58429f1dd946bc7e7a019932da4f181cb6bb849777b2
Python
45,396
1,018
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals import copy, warnings from os import path from collections import OrderedDict import itertools import numpy as np from scipy import stats, signal, interpolate, special import matplotlib.pyplo...
c2aea4b354a316436f7e6f2f1db109d508c17b733e1ea6a8560b6719db9e278e
Python
45,572
1,252
"""Base geometry class and utilities. Note: a third, z, coordinate value may be used when constructing geometry objects, but has no effect on geometric analysis. All operations are performed in the x-y plane. Thus, geometries with different z values may intersect or be equal. """ import re from warnings import warn ...
d228f1ec9db16e2166aac3eefdff79483db88e93aaed03cbfa028c7e38e929ad
Python
45,692
1,402
""" Unit tests for the basic utility functions in voxelmorph. """ # Standard library imports import pytest import torch import voxelmorph as vxm import voxelmorph.nn.functional as vxf import neurite as ne import neurite.nn.functional as nef def test_affine_to_disp_identity(): """ Identity affine should prod...
a1a6c0f5deb32c992a363401b4bee24b6a2f4444052e819b5b43321a369929b0
Python
45,753
1,311
# Copyright 2022 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,...
f4d5693b9a51a83c1bf10ff3debcdae99fb34e14c498c5be4f8739dfaf572f89
Python
45,770
860
# Main imports ------------------------------------------------------------ import os, json, glob, shutil from scipy.io import loadmat import numpy as np import pandas as pd import nibabel as nib import brsc_utils as utils from joblib import Parallel, delayed # Plotting import matplotlib.gridspec as GridSpec import ...
7162b19e51056ce0767bb7b95f8192584009ac29bfb7b172c541560421eab425
Python
46,108
1,161
import pickle import numpy as np import pandas as pd import os import matplotlib.pyplot as plt import seaborn as sns from pathlib import Path from lifelines import KaplanMeierFitter from lifelines.statistics import logrank_test from sksurv.metrics import cumulative_dynamic_auc import math # 核心设置:将 PDF 字体类型设为 42 (TrueT...
1d39141a7e25f2b198206beffc0ff11f1551e0f24313ccc5b40fb8c6a0d124ee
Python
46,240
1,400
# Copyright 2022 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,...
04a3cc40cf4017e202bc11c75b875d4379a2f5e3e1f30a00c1a1e3e587dada2a
Python
46,474
1,174
"""coordinate, topology and plumed modification functions""" from dataclasses import dataclass, field from enum import Enum import logging from copy import deepcopy from pathlib import Path from typing import Optional, Union from math import sqrt import MDAnalysis as mda import numpy as np from kimmdy.constants impo...
551fb38ddb3062ab431d30d6034567a106f859d9202cc1847843d8694130d14e
Python
46,477
1,410
"""Configuration file for the Sphinx documentation builder. This file only contains a selection of the most common options. For a full list see the documentation: https://www.sphinx-doc.org/en/master/usage/configuration.html """ # Authors: The MNE-Python contributors. # License: BSD-3-Clause # Copyright the MNE-Pytho...
6af7be6cc38e75544d3724822fc8e395590cd707d2d0a68623aeaaf1ef330252
Python
46,650
1,365
import pandas as pd import numpy as np import os import matplotlib.pyplot as plt import seaborn as sns from nilearn.plotting import ( view_connectome, view_markers, view_img_on_surf, plot_connectome, plot_surf_stat_map ) from nilearn.maskers import NiftiLabelsMasker from nilearn.surface import vol...
7742794e65b0a11cabae72410ac9d1c10604c4c4cbc3c3dd27445ca7896d23a0
Python
46,797
1,260
# This code is part of OpenFE and is licensed under the MIT license. # For details, see https://github.com/OpenFreeEnergy/openfe """OpenMM Equilibrium AFE Protocol base classes =============================================== Base classes for the equilibrium OpenMM absolute free energy ProtocolUnits. Thist mostly impl...
d78d952aa8954ea5332102b4bec9b6862f95aaa21b401e251de6f5ff8f35bb78
Python
47,030
1,143
# Copyright 2021 DeepMind Technologies Limited # # 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 agr...
a874315398c7c075a5ac4889ec4df2609491470667f42016fde631e8d6ca2adf
Python
47,104
1,164
""" Path management utilities for organizing model and data directories. This module provides comprehensive path management for the TimeFlies project, implementing the clean 2-level naming convention: - Level 1: Experiment Type (tissue_model_encoding) - Level 2: Configuration Details (method_cells_sexes) Naming Rules...
8b758df858a6fb0a072e1ade954631b779c8712778c61c7241d28700220377ee
Python
47,144
961
# -*- coding: utf-8 -*- import os, glob, math import numpy as np import nibabel as nib import pandas as pd import warnings from statsmodels.tools.sm_exceptions import ConvergenceWarning import matplotlib.pyplot as plt #nilearn from nilearn.plotting import plot_design_matrix from nilearn.glm.second_level import Second...
82ffc1857e45fad0805bf3eab3926ddb3f20d903ccf85e290018b1372c02256c
Python
47,397
1,325
"""Command line interface for Aurelian agents.""" import logging import os import warnings from pathlib import Path from typing import Any, Awaitable, Callable, Optional, List, Tuple from aurelian.utils.async_utils import run_sync import click from pydantic_ai.models.openai import OpenAIModel from pydantic_ai.provide...
e88780f98c19bf4bc37c6f72f41e16787169a8c9f8daa68297ab2c6a2ead153d
Python
47,426
1,344
""" Single tensor operations (no B, C, dimensions assumption) """ # Core library imports import warnings from typing import Callable, Union, Sequence, Tuple, Literal, Optional # Third-party imports import numpy as np import torch import neurite as ne import voxelmorph.nn.functional as vxf __all__ = [ 'affine_to_d...
4067eccd24f61984d9ecefb3d2b13b14f09d235a9fde8b798748dc4cbd12ab9b
Python
47,463
1,338
import bisect import itertools import logging from datetime import timedelta from typing import List, Optional, Tuple, Dict, Any import matplotlib.pyplot as plt import numpy as np import pandas as pd from matplotlib.lines import Line2D from ethopy_analysis.data.loaders import ( get_trial_behavior, get_trial_e...
672efe9ec0b9bde853f84077450cdd9467701b8bd6328693e482a40f09c12e07
Python
47,889
1,103
import csv import functools import logging from collections import defaultdict from itertools import islice from pathlib import Path from typing import Dict, List, Mapping, Optional, Set, Tuple, TypedDict, Union from xml.etree import ElementTree from pydantic import BaseModel from multiqc import config from multiqc.b...
bf3817c6b6f14c537b72c1d26f7980598dcfd789267423b9bbbb01b2fd73fbd7
Python
47,910
573
""" @package forcebalance.parser Input file parser for ForceBalance jobs. Additionally, the location for all default options. Although I will do my best to write good documentation, for many programs the input parser becomes the most up-to-date source for documentation. So this is a great place to write lots of comm...
880351745a198104024f8f415a74e655af03c21bb952a2a437037e11425b2d98
Python
48,008
954
import numpy as np import pandas as pd import glob, os import scipy.stats as st import matplotlib.pyplot as plt import seaborn as sns from functools import reduce from sklearn.preprocessing import StandardScaler import lifelines, itertools from sklearn.model_selection import KFold drugs_lst = ['RIF', 'INH', 'EMB', 'PZ...
8b6475963061e753ce8e86e0a53cf6391ba339a116d48ae52018d329193bb921
Python
48,228
1,251
#!/usr/local/bin/env python # ============================================================================================= # MODULE DOCSTRING # ============================================================================================= """ Test custom integrators. """ # ==========================================...
bed60f3679a75aaac28d395537f34b40c77ad55f70f6f4e873a94f66fef71742
Python
48,238
1,139
import base64 import json import logging import math import os import re from textwrap import indent from typing import Any, Dict, List, NamedTuple, Optional, Tuple, TypeVar, Union import requests import yaml from pydantic import BaseModel, Field from multiqc import config, report from multiqc.core.log_and_rich impor...
563544543819c80804db6ecb0ea80f1c60e199117291d8fe88bdc630338b5ba5
Python
48,513
1,367
import bisect import itertools import logging from datetime import timedelta from typing import List, Optional, Tuple, Dict, Any import matplotlib.pyplot as plt import numpy as np import pandas as pd from matplotlib.lines import Line2D from ethopy_analysis.data.loaders import ( get_trial_behavior, get_trial_e...
ba79d3c48a5fbb1b3c1e5e24680e9c2cb6e6c9bbd34076afd910a19db29e12ea
Python
48,541
1,187
import numpy as np import matplotlib import matplotlib.pyplot as plt import glob import os import string import nibabel as nib from statsmodels.stats.multitest import multipletests from utils import Show_Stars, SortFiles, MakeBoxplot, DrawLines2, DrawLines from statistical_tests import PerformWilcoxonMotion, PerformWil...
86f7d3e7d394d5254567044e871b6a8e4137dcc5e0f6c7e084eb93739a68b618
Python
48,628
1,129
"""MultiQC functions to plot a bargraph""" import copy import json import logging import math from collections import OrderedDict, defaultdict from typing import Any, Dict, List, Literal, Mapping, NewType, Optional, Sequence, Set, Tuple, TypedDict, Union, cast import numpy as np import plotly.graph_objects as go # t...
def55249ef011da414efad9064256bb1ae2957f39f58f26a145c156f64360c83
Python
48,665
1,110
import copy import json import logging import random import re import uuid from collections import defaultdict from itertools import chain from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Tuple from natsort import natsorted from multiqc import config from multiqc.base_module import Bas...
290dd872aedfce1af61159f4e5e13ec27a7219d4dcaf622f1e34cc1481134340
Python
48,845
1,359
# This code is part of OpenFE and is licensed under the MIT license. # For details, see https://github.com/OpenFreeEnergy/openfe """OpenMM Equilibrium SepTop Protocol base classes ================================================== Base classes for the equilibrium OpenMM SepTop free energy ProtocolUnits. Thist mostly ...
dc8bea243125874deafb48402f7e44d16806bf3ff17efb5bda16f96cb4e59bc8
Python
48,886
1,336
# This code is part of OpenFE and is licensed under the MIT license. # For details, see https://github.com/OpenFreeEnergy/openfe import itertools import json import math import pathlib from collections import Counter from unittest import mock import gufe import mdtraj as md import numpy as np import openmm import open...
c7837656bd7284ad0b866729c77e2c1045f7d13901a8e1936374041c412a0712
Python
48,926
1,270
""" MultiQC report module. Holds the output from each module. Available to subsequent modules. Contains helper functions to generate markup for report. """ import base64 import dataclasses import fnmatch import gzip import inspect import io import json import logging import mimetypes import os import re import shutil ...
a3b47b9eaf21384eeafe4ba099c29f1ea46a5cb79b51627ee80f060ee12e324a
Python
49,007
1,963
"""This file contains code used in "Think DSP", by Allen B. Downey, available from greenteapress.com Copyright 2013 Allen B. Downey License: MIT License (https://opensource.org/licenses/MIT) """ import copy import math import numpy as np import random import scipy import scipy.stats import scipy.fftpack import subpr...
6a3b8dcc96dd5256b4cc7c69de7326519bb5e70f20398ec589d6bf7dec3e8bf2
Python
49,249
1,052
import os import matplotlib import numpy as np import pyqtgraph as pg import scipy.io as sio from matplotlib import cm from qtpy import QtCore, QtGui, QtWidgets from qtpy.QtCore import Qt, QUrl from qtpy.QtWidgets import * from facemap import utils from facemap.gui import guiparts, help_windows, io from facemap.neura...
eae86a483ee81d15d80ff0e25a68990013787ca163d4f25e649d88d12ae9a7e5
Python
49,408
1,096
""" twinc_reg_network.py Author: Anupama Jha <anupamaj@uw.edu> TwinC regression model architecture. """ import torch import numpy as np from twinc_reg_utils import count_pos_neg, decode_chrome_order_dict, decode_list from sklearn.metrics import roc_curve, roc_auc_score, average_precision_score, precision_recall_curve ...
5a83414f8b366f3a2bffd92f875f7cdfefb9cd7de8cb36f013e8b1a81f5261b9
Python
49,693
1,294
""" PCA Analysis of Input Weight Patterns This module provides Principal Components Analysis (PCA) of synaptic input weight patterns to test whether excited and suppressed cells differ in their multivariate input combinations rather than individual source means. Complements univariate nested weights analysis by testi...
45e56768cc27b084429dcf3eec198106ef795c85b9e87169f14b54ba90c92542
Python
49,701
1,058
from collections import defaultdict import cv2 from functools import partial import numpy as np from scipy import fft from scipy.fftpack import next_fast_len import shapely import shapely.geometry as shpgeo from shapely.ops import unary_union from feabas.config import DEFAULT_AVG_DEFORM, data_resolution, section_thick...
9514077945a8c8b7a06c48874d8e96265455cd407f4e37bacd2805ecf32051ca
Python
49,900
1,450
from dataclasses import dataclass, field import dataclasses from functools import cached_property from typing import ( Any, Callable, ClassVar, Generic, Iterable, Literal, Self, Sequence, Type, TypeAlias, TypeVar, Tuple, ) import abc from uuid import UUID from loguru imp...
f22659c0b7625b05039f527f64e88c6a59ffce3be9b3801f674b9d5318e865cb
Python
50,010
1,198
""" Violin plot module. Also handles scatter plots and tables. """ import copy import json import logging import math from dataclasses import dataclass from typing import Any, Dict, List, Optional, Set, Tuple, Union, cast import numpy as np import plotly.graph_objects as go # type: ignore import polars as pl from m...
228c17497a1d6c74ded697c78f7a7feac73d4f16ec583a48a7418e9919d1266e
Python
50,029
1,347
import json import pickle import struct import warnings from contextlib import nullcontext import numpy as np import pytest import shapely from shapely import ( GeometryCollection, GEOSException, LinearRing, LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon, ) f...
857b9d78164fc9e055e6b37ff75701a36c960d8692b2b3025596b5cfbc357248
Python
50,394
990
""" twinc_network.py Author: Anupama Jha <anupamaj@uw.edu> """ import torch import numpy as np from .twinc_utils import count_pos_neg, decode_chrome_order_dict, decode_list from sklearn.metrics import roc_curve, roc_auc_score, average_precision_score, precision_recall_curve def encoder_linear_block(layer1_in, ...
c9c2309490212c8114301f29bee5bdf1cbbe3374eef81dc616eb4b1a337e8810
Python
50,464
1,438
# Copyright 2022 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,...
35dabe9d6fd568171c83ed56b6701d559257210babf033aaeffbd1eeffb48a04
Python
50,529
1,492
# This code is part of OpenFE and is licensed under the MIT license. # For details, see https://github.com/OpenFreeEnergy/openfe import itertools import json import math import pathlib from unittest import mock import gufe import mdtraj as md import numpy as np import openfe.protocols.openmm_septop import openmm impor...
52ca71f3d88bff5291fae0075ea0e71e09076dfa12166692b88abe4337d8be52
Python
50,711
1,113
""" @package forcebalance.smirnoff SMIRNOFF force field support. @author Lee-Ping Wang @date 12/2018 """ from __future__ import division from builtins import zip from builtins import range import os from forcebalance import BaseReader from forcebalance.abinitio import AbInitio from forcebalance.abinitio_pairwise impo...
8e40cd55296761eef6367cfbb22d8bce3b180b143d8ea477923a2063cea0cf87
Python
50,732
1,186
# Copyright 2017 Google Inc. # # 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,...
ffbbaedb293055415d067b998577c914f64f8a891dc1632e574797b8060fdc42
Python
50,752
1,454
# Copyright 2022 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,...
2a5d18bcf40a73839ca558bb939705ce2c9d335c4e2bc8aa7712c65e06d91d5e
Python
51,059
1,339
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2017 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """PEP 376 implementation.""" from __future__ import unicode_literals import base64 import codecs import contextlib import hashlib import logging import os import posixpath import sys import z...
f74e4bafd5e7d24f46607eb8a91164cd468f9de94bee07e33f9628f56c3a0449
Python
51,367
1,329
import itertools from typing import Any, Literal import matplotlib.pylab as plt import networkx as nx import numpy as np import seaborn as sns from adjustText import adjust_text from openff.units import Quantity, unit from cinnabar import conversion, plotlying, stats from cinnabar.femap import ABSOLUTE_ANALYSIS_TYPES...
283fbd5091ac96d2c73b1b174500e4b48ab85c600c9eeeadb8c0735b7e9f4320
Python
51,423
788
import sys import os import logging import pandas as pd import numpy as np from copy import deepcopy from abc import ABC, abstractmethod from typing import List import traceback import math from ..Utils.resources import SharedResources from ..Utils.io_converters import reload_optimal_validation_parameters from ..Plotti...
39cb806fe2b437546026fe0ae0fddf7dd9b6c7d7db19e244d4bba9cca368a26f
Python
51,581
1,017
import matplotlib.pyplot as plt import matplotlib as mpl from itertools import combinations import math import warnings import mplcursors import numpy as np import pandas as pd from scipy.stats import levene, shapiro, mannwhitneyu, yeojohnson, boxcox import pingouin as pg import statsmodels.api as sm from statsmodels....
6c9a719e770cb8268a2335a7f01659405de9ba078cd8c06e84a186b4996dd891
Python
51,740
1,195
###################### Libraries ###################### # Deep Learning import tensorflow as tf import keras from keras.models import Model, load_model from keras.layers import Input, Conv2D, MaxPooling2D, Conv2DTranspose, concatenate from keras import backend as K from tensorflow.keras import layers, optimi...
ec9f68b5a78f2ca1fefd2ab7f19fa9e542d0ca56dea69ae7c6cc33f24ab3688b
Python
51,908
1,067
import random from datetime import date from uuid import UUID import pandas as pd from sqlalchemy import select from truesight import plot_utils, stats_utils from truesight.db.models import ( DbEvaluation, DbEvaluationQuestion, DbLLM, DbQuestion, DbResponse, ) from truesight.db.session import get_se...
25b514f7d4206e9fd4d92e54ff9157c22f7145184b7ee352b79a3a3b5dac82b4
Python
51,996
1,303
# sphinx_gallery_thumbnail_path = '../_static/momi2025__Figure_2.PNG' """ .. _ex-momi2025: ==================================================================================================== Gradients of Excitability and Recurrence Revealed by Stimulation Mapping and Whole-Brain Modelling =========================...
fdc0bf302ee7af4a6e24e0bc40c97120b3531e28da5818e8563245ef82e97485
Python
52,094
819
__author__ = "Timothy Tickle" __copyright__ = "Copyright 2015" __credits__ = [ "Timothy Tickle", "Brian Haas" ] __license__ = "MIT" __maintainer__ = "Timothy Tickle" __email__ = "ttickle@broadinstitute.org" __status__ = "Development" import Commandline import os import ParentPipelineTester import unittest class Scri...
cbc87d40dc2ee5572a9eda5f7aaed71277d024dfcaafde45347530a7f545dcc8
Python
52,117
1,475
# Copyright 2022 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,...
80c6f226461a31d0f6e37f9fb560208a508a7293b0ea5fafadb0cfadbe33f619
Python
52,240
1,274
# This code is part of OpenFE and is licensed under the MIT license. # For details, see https://github.com/OpenFreeEnergy/openfe """Equilibrium Relative Free Energy methods using OpenMM and OpenMMTools in a Perses-like manner. This module implements the necessary methodology toolking to run calculate a ligand relative...
4220e91594244dcb0edbbf6a4cff6083fa9734df7557f679fd3f020fe659c7d3
Python
52,262
1,380
# This code is part of OpenFE and is licensed under the MIT license. # For details, see https://github.com/OpenFreeEnergy/openfe """OpenMM Equilibrium Binding AFE Protocol --- :mod:`openfe.protocols.openmm_afe.equil_binding_afe_method` ====================================================================================...
c4cbb87fd3e513e10f505653706b490bb86912f63a15a5c5a894a0300c7a096a
Python
53,223
1,153
""" @package forcebalance.tinkerio TINKER input/output. This serves as a good template for writing future force matching I/O modules for other programs because it's so simple. @author Lee-Ping Wang @date 01/2012 """ from __future__ import division from __future__ import print_function from builtins import str from b...
68b7bdb6c1369e568a01190b7ec9c5cc2227a92884565a166894af3be0c50468
Python
53,276
1,594
""" NWB File Export Module for Ethopy Data This module provides functionality to export experimental data from DataJoint tables to NWB (Neurodata Without Borders) format files. """ import logging import os from datetime import datetime, date from dateutil.relativedelta import relativedelta from typing import Any, Di...
86f26976d12e0e128f29aec20fcad8e6667dd92616ba4e36e85fea94ce399daf
Python
53,371
1,287
""" 特征稳定性可视化脚本 功能:基于feature_stability_analysis.py生成的数据文件,创建5个主要可视化图表 作者:AI助手 日期:2025-12-11 生成图表: 1. 6种XAI方法稳定性箱线图(跨癌种) 2. 3类XAI方法稳定性箱线图(跨癌种) 3. 15癌症×6XAI稳定性热力图 4. 代表癌症(LGG)6种XAI方法稳定性箱线图(50个抽样模型) 5. Kuncheva随Top-k变化折线图 """ import os import pandas as pd import numpy as np import matplotlib.pyplot as plt import seabor...
65186ac3eb00bb88846106529dfd9183d502c9dcb589e5140f9b51b5bcdbc920
Python
53,439
1,068
import logging import os import math from PySide6.QtWidgets import QLabel, QHBoxLayout, QVBoxLayout, QLineEdit, QListWidget, QListWidgetItem, QErrorMessage,\ QPushButton, QFileDialog, QSpacerItem, QComboBox, QStackedWidget, QWidget from PySide6.QtCore import Qt, QSize, Signal from PySide6.QtGui import QIcon, QPixma...
1a34df002f3489ea69aff83daea32e1b0d57614983a70825587fead2193c21a9
Python
53,535
1,296
""" meta/lodo_cv.py — Leave-One-Dataset-Out Cross-Validation ========================================================= Evaluates the recommender system using LODO-CV against 7 baseline strategies. Baseline strategies ------------------- 1. Random : randomly select a method 2. Always-GRAPE : alw...
d41efe2146298c3dd13bde68a35f2d89f7cf8fb1d0aa27142799e1363497e4a3
Python
53,627
1,543
import sys import tempfile from typing import Dict, List, Union from unittest.mock import patch import pytest from multiqc import config, report from multiqc.core.exceptions import RunError from multiqc.plots import bargraph, box, heatmap, linegraph, scatter, table, violin from multiqc.plots.linegraph import LinePlot...
d3178545512fcea8285833a989ffeeab017fff2fff7f5141bffcb26b61aedfb3
Python
53,640
1,581
# THIS PYTHON FILE IS DOWNLOADED FROM https://github.com/elkebir-group/CloMu/pulls, A PULL REQUEST THAT SOLVES AN ISSUE WITH THE ORIGINAL CODE DEVELOPED BY STEFAN IVANOVIC AND EL-KEBIR, WHICH CAN BE DOWNLOADED FROM https://github.com/elkebir-group/CloMu import copy import torch from torch.autograd import Variable imp...
db846d5bbf531adea6df4cd4f6a5ad107d2deaba4d221b2089e19d39957770b5
Python
53,673
1,069
""" JSON Schema for MultiQC config validation. Generated from the config defaults and type hints. """ from contextlib import contextmanager from contextvars import ContextVar from functools import lru_cache from typing import Any, Dict, Iterator, List, Literal, Optional, Union from pydantic import BaseModel, ConfigDi...
0e6f7708659016ad630792cacea259865efd23b511293c2e30eadd4c7da4aab9
Python
53,791
1,396
"""List of force fields and water models.""" from pathlib import Path from proteinbenchmark.utilities import package_data_directory ff_directory = Path(package_data_directory, "force-fields") # List of force fields with force field XML file, water model, and water model # XML file force_fields = { "espaloma-0.3...
fbbe66ae068083f455662615a9155a740404bca1419d04f005525ceb301b7771
Python
54,027
1,423
# This code is part of OpenFE and is licensed under the MIT license. # For details, see https://github.com/OpenFreeEnergy/openfe r"""OpenMM Equilibrium SepTop RBFE Protocol Units ================================================ This module implements the :class:`gufe.ProtocolUnit`\s for the Separated Topologies RBFE p...
1423d6808d57f467706e72f986280d2bfe2a75341ede094ce639ba1434921e60
Python
54,173
1,356
import re import sys import queue import shutil import tempfile import threading import zipfile from functools import lru_cache from pathlib import Path import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import nibabel as nib import numpy as np import gradio as gr REPO_ROOT = Path(__file__).resol...