sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
33c83988ad08f035f3a41c09c6360e6c5d0565b409c3ed89a0f63650d2bf6dbf
Python
13,747
386
# @license # Copyright 2016 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
d13e3e51924604d244a1b97bbd615e06c445fca5a012a3e93e4a3a0dc8bc7f8b
Python
13,749
271
from __future__ import annotations import argparse import json from pathlib import Path import numpy as np import pandas as pd from scipy.stats import pearsonr, spearmanr from sklearn.metrics import average_precision_score, roc_auc_score from st_risk.paths import current_results_dir, ensure_results_layout, project_r...
2aa6f8abf62e5a299a798f03f1a135f475f2c6669e6269cce33726a4d4577f10
Python
13,753
330
import gzip import os import re import types from pathlib import Path from typing import Iterable, Optional, Tuple, Union import polars as pl import typing_extensions from rnalysis.exceptions import InvalidTypeError, InvalidValueError def is_legal_file_path(file_path: str): if not isinstance(file_path, (str, os...
a3c7839e9608be07c0d60414b95569b3fc93234e2ccb584e5d0d8794a035c726
Python
13,753
280
"""Plot 0D stripping-response proxy figures from generated thermodynamic CSVs.""" from __future__ import annotations import argparse from pathlib import Path import shutil import matplotlib as mpl mpl.use("Agg") import matplotlib.pyplot as plt import numpy as np import pandas as pd GAS_ORDER_STRIPPING = ["He", "N...
7eb9ad3ba4fa2dfeae0b2e492cf9774fe351092496f87379d8da0cb65fe0d209
Python
13,754
414
import torch import torch.nn as nn import torch.optim as optim import os import tqdm from utils import general from networks import networks from objectives import ncc from objectives import regularizers class ImplicitRegistrator: """This is a class for registrating implicitly represented images.""" def __c...
2517738f3f6596355b80e07b7ef10ae7e1e385a564311a515444d93d4a53ff10
Python
13,765
411
"""Maintained PhyloGPN configuration, tokenizer, and inference model.""" from __future__ import annotations from collections.abc import Sequence from typing import Any, ClassVar import torch from jaxtyping import Float, Int from torch import Tensor, nn from torch.nn.utils import parametrize from transformers import ...
9e622cf3362502dbbf2a144a2a1fd6ff93ef3d833f9826894760fd6b7fd46404
Python
13,768
442
import json import stat from pathlib import Path import pandas as pd import pyarrow.parquet as pq import pytest import gpn.checkpoint as checkpoint from gpn.checkpoint import ( BatchRange, CheckpointManifest, CheckpointStore, IncompatibleCheckpointError, InvalidCheckpointError, expected_batch_...
cdf85e145a45b0405b5d2fbbc0c59fd222130d7d8de645895f698059b242697b
Python
13,774
318
import numpy as np import scipy.io as si import os import h5py from sklearn.model_selection import KFold from imblearn.over_sampling import RandomOverSampler from imblearn.under_sampling import RandomUnderSampler from sklearn.svm import SVC import sklearn.pipeline as skp from sklearn.preprocessing import StandardScale...
d5cf4e81ba834163a05de4ab6c085b25f0a1bffd88c172202c4e8f6f0dacc74b
Python
13,778
445
import logging import math import re import numpy as np import pandas as pd from scipy.stats import chi2 from gsMap.config import FormatSumstatsConfig VALID_SNPS = {"AC", "AG", "CA", "CT", "GA", "GT", "TC", "TG"} logger = logging.getLogger(__name__) default_cnames = { # RS NUMBER "SNP": "SNP", "RS": "SN...
532b241697ed11df6c530fc33f14062071c79fa58f169c89803645f3a85777b3
Python
13,803
358
"""Pure unit tests for `d3text.models.entity_linking.BrendaClassificationModel` — the class loss, `ground_truth`'s batch handling, and the document-level class-negative abstention. Every test here runs on CPU with tiny synthetic tensors and no data, network, or GPU. Methods are exercised through the `stub` fixture (se...
c519520ef142d7e6859584ab46837b2c83bf1b7ecd0d45a6d003614d78eb42ca
Python
13,816
356
import simplejson as json from ... import options as opts from ... import types from ...charts.chart import Chart from ...datasets import COORDINATES from ...exceptions import NonexistentCoordinatesException from ...globals import ChartType class GeoChartBase(Chart): def __init__( self, ...
025d00ab0c4573cae460195ef716b8ef2f7492186a2ee023291e85690b3140e6
Python
13,818
313
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Oct 9 11:45:32 2025 @author: forel """ import os import sys import numpy as np import json from scipy.stats import pearsonr import copy import matplotlib import matplotlib.pyplot as plt from scipy.stats import gaussian_kde from typing import Tuple, L...
0e8db2da342ed7e9d3835c15407a0f734c87d704a0c083cabeef5a4398456598
Python
13,821
382
from __future__ import annotations from typing import TYPE_CHECKING import torch from torch.distributions import Categorical, Independent, MixtureSameFamily, Normal from torch.distributions import kl_divergence as kl from torch.nn import functional as F from scvi import REGISTRY_KEYS from scvi.distributions import N...
b5981d061cf63a434d121fb0a0ae83232645b86046fdc3a47e9d7ab5f9f49949
Python
13,828
392
from __future__ import annotations import random from typing import TYPE_CHECKING import mlx.core as mx import mlx.nn as nn from scvi import REGISTRY_KEYS from scvi.module.base import LossOutput if TYPE_CHECKING: from typing import Any def _lgamma(x: mx.array) -> mx.array: """Log-gamma function via Numeri...
446bf5d4f84b20847e473212cf014dfb1e1b0dc0b78463e351afd5571c996ab2
Python
13,836
356
# # Copyright 2017 National Technology & Engineering Solutions of Sandia, LLC # (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government # retains certain rights in this software. # # See LICENSE for full license details # from __future__ import annotations import json import os import sys im...
a4eddfef10d89b9f059b402bd5d4a61e40d6aeaa77eff47bd39277dd8bbbb886
Python
13,836
400
import os import unittest import numpy as np import pandas as pd from numpy import testing as np_test from skbase.utils.dependencies import _check_soft_dependencies from pgmpy.estimators.CITests import ( chi_square, ci_registry, g_sq, log_likelihood, modified_log_likelihood, pearsonr, pear...
7da1857424e005c0cbf980d7b6f5d020f450f11795fe9714de3c2f7dfb8a514d
Python
13,838
394
from __future__ import annotations import logging import warnings from typing import TYPE_CHECKING import numpy as np import pandas as pd import torch from scvi import REGISTRY_KEYS, settings from scvi.data import AnnDataManager from scvi.data.fields import CategoricalObsField, LayerField, NumericalObsField from scv...
253cb833ab4d9f37a3b0c340ff6347f4f1024b55049c39e026b7e08d175d8934
Python
13,850
336
"""HIPPIE command-line interface. Subcommands: hippie-cli validate-data <dataset_dir> Check that a dataset folder follows the canonical CSV layout. hippie-cli embed --datasets-root <dir> [--datasets <name>...] Run the pretrained HIPPIE encoder over one or more dataset folders and writ...
4b711f6392a728531126a94bd42798e01b82c9cf7c1c7189104a995b5eefdb9e
Python
13,850
379
# 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. import logging from dataclasses import dataclass from pathlib import Path from typing import Dict, List, Optional, Tuple import torch from f...
198353b1ef5a3da1ccf3bce216b484a643a3017e5cff432833ed418d76ee308d
Python
13,861
373
# Copyright 2015 The TensorFlow Authors. 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 applicable...
069abdb6f4351849709afaa783625d0a8cf30a7520bfc74b483cd850ef496fc5
Python
13,866
367
import pytest from pgmpy.identification.probability_expression import ( DivisionNode, MarginalNode, ProbabilityExpressionTree, ProbabilityNode, ProductNode, _TreeNode, ) @pytest.fixture def prob_y(): return ProbabilityNode(frozenset({"Y"})) @pytest.fixture def prob_x(): return Proba...
c8c18ab71d5d84568380c8366d5dbae3a92f6bd0e7ee1b4ac23ae0cef68ba8c9
Python
13,869
334
""" This module builds RNA nucleotide tokenizer. Author: wangning(wangning.roci@gmail.com) Date : 2022/8/8 2:43 PM """ # built-in modules import os import io # paddle modules from paddlenlp.transformers import BasicTokenizer, PretrainedTokenizer from paddlenlp.data.vocab import Vocab class NUCTokenizer(PretrainedT...
c579b1a116a201b40b8974a271e9436f2c8222092826987bfd7ab4c3a9f48f99
Python
13,870
408
# 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. from dataclasses import dataclass, field from fairseq.models.fairseq_decoder import FairseqDecoder import numpy as np from typing import Opti...
f57f84dbb8f4c3a97cf15122d976f6f7986710d4d7ecf7ce258f8cec66e23d55
Python
13,870
443
#!/usr/bin/env python # -*- coding: utf-8 -*- """Characterizes each cell""" from typing import Optional import warnings import numpy as np import matplotlib matplotlib.use("Qt5Agg") import matplotlib.pyplot as plt # noqa E402 from matplotlib.axes import Axes # noqa E402 from matplotlib.figure import Figure # noq...
d823f4cc9fbf01e39d4289b3a79342e3a36e24e307b27cc9007f057570d58826
Python
13,874
336
"""Phase 5 — three-lattice universality test, L = 16 ... 128. Tests whether the L-independent E/V observed in Phase 4 generalises to THREE distinct 2D lattices with different coordination: honeycomb z=3 p_c = 0.6970402 (Suding & Ziff 1999) square z=4 p_c = 0.5927462 (Newman & Ziff 2000) trian...
171d2ea52d1a88d54cff0019bea3913ceda24a8baab4eaab8d65879351941e25
Python
13,877
367
from __future__ import annotations from pathlib import Path import pandas as pd from st_risk.reporting.decision_support import ( ABSTAIN_CAUTION, ABSTAIN_REVIEW, ABSTAIN_TRUSTED, build_consensus_primary_inputs, build_decision_support_summary, build_decision_validation_summary, build_deplo...
310e7ae9b17190e128b023a38c7695ce3a1bf31bd22a2897684716f1b864b373
Python
13,877
386
# 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. # The code in this file is adapted from the BeiT implementation which can be found here: # https://github.com/microsoft/unilm/tree/master/beit...
338b92637a53e8de8380792e0c6d3083c9ce8a5de0db2a0fea9625c39073f429
Python
13,877
362
# 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. import math from typing import Dict, List, Optional import torch import torch.nn as nn from torch import Tensor from fairseq import utils fr...
f199da883e086560a573e26a4b78874a45220c9fbb75c04dd91560f047b14edb
Python
13,890
158
"""List of the GO IDs that have lots of descendants and low information content""" __copyright__ = "Copyright (C) 2018-2019, DV Klopfenstein. All rights reserved." __author__ = "DV Klopfenstein" # pylint: disable=line-too-long NS2GOS_SHORT = { 'BP': { 'GO:0008150', # BP 29685 18,453 0.015902 4.14 L00 ...
b1c3b2a9e99378d8fdaacb5ca217aa19bbcb069d5cb33580df324af72c878f4a
Python
13,896
334
""" Copyright (c) Facebook, Inc. and its affiliates. Copyright (c) Microsoft Corporation. Licensed under the MIT License. Code derived from the OCP codebase: https://github.com/Open-Catalyst-Project/ocp """ import sys import numpy as np import torch from torch_scatter import segment_coo, segment_csr from mattergen.c...
34c085c902b5dd76bb7f3713550f095fd5ab958fb7b9979e6662bc9cff13f827
Python
13,900
360
from typing import Any import numpy as np import pandas as pd from sklearn.base import clone from sklearn.linear_model import LinearRegression from sklearn.model_selection import KFold from sklearn.utils.validation import check_is_fitted, validate_data from pgmpy.prediction._base import BaseCausalPrediction class D...
4da8db31b80d34fd498e49032340a0b7198b4099b13b75323b0b0a373d53cf74
Python
13,917
403
"""Shared test fixtures. The `stub` factory makes the model methods unit-testable without constructing a full model, and `tiny_brenda` builds a small on-disk HDF5 and matching frame so `BrendaDataset` can be exercised without the ~300 MB BRENDA files. """ import logging import pathlib import types import h5py import...
6b6edcdacd6f7a946b1257cdcfec2d1f3c327aaf582495233650e6b3c0695327
Python
13,920
282
import argparse import joblib import pandas as pd from datetime import datetime from pathlib import Path from neuron import h import figures import sseEPSP import morphologyandproperty from neck_function.plot_neckfunction import compute_axialresistance import sync_activation_pkl as syncact import glob import os impo...
3131d4b1c0aae00ffa1d5c0b15d442bb9ae7562c5e6a6dd207fa8053c1317573
Python
13,921
398
import logging from collections.abc import Callable from typing import NamedTuple import numpy as np import torch import torchmetrics from torch import nn from scvi.module.base import BaseModuleClass, LossOutput, auto_move_data logger = logging.getLogger(__name__) class _REGISTRY_KEYS_NT(NamedTuple): X_KEY: st...
be0eb48baad852e9d94c5d4e29da236ff2e99ed5c07d88e08021ebdc7242c88f
Python
13,921
349
import os import torch import pickle from multiprocessing import Pool import numpy as np from torch.utils.data import DataLoader, Dataset, RandomSampler, SequentialSampler, TensorDataset from transformers import PreTrainedTokenizer from utils import logger from tqdm import tqdm from src.transformers import glue_conve...
f7c57578bf7f2083442a6e846815e90003db809678ac41eef66da5d9727c3c1f
Python
13,933
358
import os import importlib import numpy as np import matplotlib.pyplot as plt from sklearn.manifold import TSNE import torch import torchvision from torchvision import datasets, transforms from torch import nn, optim from torch.utils.data import DataLoader from torchvision.utils import save_image, make_grid from tqdm i...
a598c99f5151df30064a64ed40ad6ca71b01fce93a0a6964cb07ae3126f61734
Python
13,937
339
# Original work Copyright 2018 The Google AI Language Team Authors. # Modified work Copyright 2019 Rowan Zellers # # 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/...
0abd24777c8224f72b9149e7d0da81f6aa4629b6c6a0d366ac9b9f8ea229f86a
Python
13,952
383
# 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. import logging import os from dataclasses import dataclass, field from typing import Optional import numpy as np import torch from fairseq im...
c87beb5a1d5564690734b794d547360e6e3b0a01d6ccd6bc6ec7d9a45ef33fb4
Python
13,955
286
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. 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 cop...
f019d9cff5f87e551394e202456b34518eaeba1ac9d59cd003efc608da9c5a0b
Python
13,955
388
from __future__ import annotations from collections.abc import Callable, Iterable, Mapping from dataclasses import dataclass, field from typing import TYPE_CHECKING, Any, Protocol, runtime_checkable import torch from scvi._constants import REGISTRY_KEYS if TYPE_CHECKING: from typing import Literal, TypeAlias ...
d2215d168a0f7a485698fb6815495bef2988fb7781706b429e8ee497e4454860
Python
13,967
343
from __future__ import annotations import json import logging import pathlib import warnings import crowsetta from ... import datapipes from ...common import labels from ...common.converters import expanded_user_path, labelset_to_set from ...common.logging import config_logging_for_cli, log_version from ...common.ti...
478cf587e7efa706b80cd6e6484556ac6584cdfa432a8785c4fe7630d122edf6
Python
13,970
400
import pandas as pd import numpy as np from syntheval import SynthEval from syntheval_benchmark_utils import results_formatting, rank_results_formatting import os from tqdm import tqdm import glob import sys #syntheval_path = os.path.dirname(os.path.abspath(syntheval.__file__)) #utils_path = os.path.join(syntheval_pat...
61f88eb91873a0362b335473793f440a0767f2e00409238e9d5080b0edc9caa0
Python
13,980
403
""" Dask configuration utilities for voluseg pipeline. This script provides comprehensive Dask configuration management, including the DaskConfig class and all utility functions. """ import yaml from typing import Optional, Dict, Any, Union from pathlib import Path import dask from dask.distributed import Client, Loc...
6a5fd56b6e746129c058f5f9fd2b3a38fcd44f235dfcb20a51fb8595e1e1511b
Python
13,991
339
from pathlib import Path from PyQt6 import QtCore, QtGui, QtWidgets from rnalysis.utils import io, settings class QuickStartWizard(QtWidgets.QWizard): TITLES = ( 'Importing Data', 'Exploring Your Dataset', 'Applying Filters', 'Undo the operations you applied to your data', ...
4f28e7d0c841c215ad574fe75d404a286bdc52741673a494ce1c9774aac07328
Python
13,994
274
import os import socket from typing import Union, Optional import nnunetv2 import torch.cuda import torch.distributed as dist import torch.multiprocessing as mp from batchgenerators.utilities.file_and_folder_operations import join, isfile, load_json from nnunetv2.paths import nnUNet_preprocessed from nnunetv2.run.load...
64a31a8c8dc280ae6868dec3f75a64db312926063742f8f6c5cc4dddb42915f1
Python
13,998
399
import importlib import json import os import tempfile from dataclasses import asdict import anndata import numpy as np import pytest import scvi from scvi.criticism import create_criticism_report from scvi.data import synthetic_iid pytest.importorskip("huggingface_hub") from scvi.hub import HubMetadata, HubModel, H...
2a5aec0115b95078557ff89974e8008d83eb4339e68b5f771b0de5d700bc51b5
Python
14,008
352
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. 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 cop...
899ef2e9da6b47e9db16d418898a49fea56b470ebb6b7a6848c327c31e3cf92e
Python
14,009
353
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. 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 cop...
47d5495ce66a8fbd6fcbc7553e00ff838746d0e1c427dcecc1b4d1e9f7ba2faf
Python
14,014
440
from __future__ import annotations import contextlib import shutil import uuid from subprocess import CalledProcessError from typing import TYPE_CHECKING from zipfile import ZipFile import pytest from build import BuildBackendException from build import ProjectBuilder from packaging.metadata import parse_email from...
7752409325798387684a6a58f0c9ead1c467b1529d0cdd35f6eef032ac6ad123
Python
14,017
357
"""Tier 2: Bayesian Optimization for D-peptide sequence optimization. Takes initial designs from Tier 1 (run_design.py) and iteratively optimizes the top sequences using Evolutionary BO or MCMC with a GP surrogate model. Usage: python -m bo.run_bo \\ --pose_pdb output/Poses/Binder_L_pose_1.pdb \\ ...
8a3c57012074800a613839f8547da60569ccae42693db65ec70735a70ad5a32c
Python
14,017
324
from typing import Dict, Optional, Union, Any import numpy as np import torch from scipy.sparse import issparse import scanpy as sc from scanpy.get import _get_obs_rep, _set_obs_rep from anndata import AnnData import pandas as pd from scgpt_spatial import logger class Preprocessor: """ Prepare data into tra...
1d5b7227701316835331453e7d4f8dac98ce687aae0d051072e4b4d5101328e8
Python
14,020
247
import os.path import math from sklearn.feature_selection import VarianceThreshold from sklearn.model_selection import train_test_split from sklearn.model_selection import KFold from sklearn.preprocessing import StandardScaler from sklearn.model_selection import StratifiedKFold import argparse import numpy as np import...
ab2e300800b32e389cba2ee3ecf51c6b1c51e212ff9c07a6627f26d8496d8521
Python
14,020
422
"""Optional MLflow experiment tracking. Every entry point here is a no-op unless `MLFLOW_TRACKING_URI` is set, which has to name an `http(s)://` server since the dependency is `mlflow-skinny`. A leaf but for `d3text.metric_docs` and `d3text.constraints`; mlflow, torch and the modules that import torch are imported onl...
3918324d403016222770fbf051f8900d0c743f58a692c6cfc21bb9e2ab5e596a
Python
14,026
278
import multiprocessing import os import socket from typing import Union, Optional import nnunetv2 import torch.cuda import torch.distributed as dist import torch.multiprocessing as mp from batchgenerators.utilities.file_and_folder_operations import join, isfile, load_json from nnunetv2.paths import nnUNet_preprocessed...
65718955c8cd528f4dbf317f3ec7668fd5dc43642a9375e27dbdc77eae1a0c2d
Python
14,040
376
# @license # Copyright 2025 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
4fefcbbd304b96e3c31c3972ffac2c31fc0d74acf5452b0d985ec7bda6c51518
Python
14,046
355
# 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. from typing import Dict, Optional, Tuple import torch from fairseq import utils from fairseq.modules.quant_noise import quant_noise from torch...
d324746f4f81e45eaa76f65001c9ec9fa8fc60681632018d759189c5f9ffee3e
Python
14,053
320
import sys import os import os.path import re import argparse import tempfile import logging from .version import __version__ logging.basicConfig(level=logging.INFO, stream=sys.stderr, format='%(name)-13s - %(asctime)s - %(levelname)-8s - %(message)s') logger = logging.getLogger(__name__) def _ch...
cc4b72b78fd592408364b9f0eb1f2529f3b07ad15ed1f61f505d3b8bae4e8fe6
Python
14,055
444
""" This module contains method to show risk taking performance of mouses. """ """ Copyright (c) 2019, 2022 [copyright holders here] This file is part of NoSeMaze. NoSeMaze is free software: you can redistribute it and/or modify it under the terms of GNU General Public License as published by the Free Software Foun...
439a142e37b238d71390e375336c146d104a51483be9e9ec73915aa986277b05
Python
14,057
225
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'generate_brain_mask_tab.ui' # # Created by: PyQt5 UI code generator 5.10.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_GenerateBrainMaskTabContent(object): def setupUi(se...
2e112e343b15a1eb7c144721c1a1fe66e7211db533f93fb1cd6390f23ad3fd23
Python
14,068
365
"""Screening a candidate document for enzyme mentions. The measurement these support found the literal screen refuted by its own control: rejecting a document on *any* exact enzyme match rejects most of the psycholinguistics pool, which names no enzyme by construction, because the index registered ubiquitous acronyms ...
add561ff8ddfc33a94c207af3a84ba27195f85ce091c2e564cb0d60fcfa44f71
Python
14,072
420
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Evaluate foreground Dice/HD95/NSD for a prediction folder. Output format is aligned with local `metrics.csv` style: - DiceNNUNet_* - DiceMONAI_* - HD95_*_vox - HD95_*_mm - NSD_* - per-case means + NSD_tau/NSD_unit """ from __future__ import annotations import argpars...
7e1d7ce2905d5b5b60288e9ac0919eece4becadba909a0eccc7afadb9697e351
Python
14,077
263
# Copyright 2023 BioMap (Beijing) Intelligence Technology Limited import argparse import random,os import numpy as np import pandas as pd import argparse import torch from tqdm import tqdm import scipy.sparse from scipy.sparse import issparse import scanpy as sc from load import * ####################################...
a9c37f7d9f5bd439857a364104f588c126ac81a6974559676b2bb5528f01a404
Python
14,077
396
#BEM spatial-jitter simulations with realistic sensor arrays and realistic noise model using MNE Python #%% # Imports import os.path as op import numpy as np import pyvista as pv import mne from pyvistaqt import BackgroundPlotter from bfieldtools import sphtools as sph import functions #%% Simulation parameters jitl...
e8bd28aa3d63070023aaac87b479986f5dc57163954388c660db1e915c00a136
Python
14,087
409
# flake8: noqa # There's no way to ignore "F401 '...' imported but unused" warnings in this # module, but to preserve other warnings. So, don't check this module at all. __version__ = "2.5.0" # Work around to update TensorFlow's absl.logging threshold which alters the # default Python logging output behavior when pre...
d3aa18ec3f72a0f40cfee7690d48e83a07731e58b93bc02276ec74c92071348e
Python
14,092
481
from scipy.spatial import KDTree import numpy as np import matplotlib.pyplot as plt from matplotlib.lines import Line2D from matplotlib.patches import Patch from collections import Counter import jax import jax.numpy as jnp from graph_tool.all import Graph from graph_tool.topology import max_cardinality_matching from...
7cab01750db53895313faa0b278ebef1aced8b69ee804aa1f070667aaeec6c0f
Python
14,093
431
# 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. import logging import os import sys import time import io import numpy as np import torch import torch.nn.functional as F from .. import Fa...
82adf43cfa44968776f4517121561b4edf11d5905fbe01e36240926ab07a02b5
Python
14,097
428
# 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. import math from multiprocessing import Pool import numpy as np from fairseq import options from fairseq.data import dictionary from fairseq....
5529ac726a2cd1a271f344bc87c3607a550cfaf1c571f4ce78eb9a08cce72530
Python
14,103
425
import numpy as np import pandas as pd import statsmodels.formula.api as smf # Colours and types Types = np.array(["T4", "T5"]) Type_colours = np.array(["#17becf", "#ff7f0e"]) Subtypes = np.array(["T4a", "T4b", "T4c", "T4d", "T5a", "T5b", "T5c", "T5d"]) Subtype_colours = np.array( [ "#1f77b4", "#9...
10016c71dbb003b3a24ec7983d3e5bc82bbb7ca2f142afb66866a7169e22dc2e
Python
14,106
396
#!/usr/bin/env python3 from collections import defaultdict from pgmpy.base import UndirectedGraph from pgmpy.factors import FactorDict, factor_product from pgmpy.utils import compat_fns class ClusterGraph(UndirectedGraph): r""" Base class for representing Cluster Graph. Cluster graph is an undirected g...
cb5e81bc4eac139aa0a03c7af7d4b9843568a4cf194e9de0c0010789073e60ed
Python
14,118
358
#!/usr/bin/env python __author__ = 'heroico' import os import io import gzip import logging import numpy from metax import WeightDBUtilities from metax import PrediXcanFormatUtilities from metax import ThousandGenomesUtilities from metax import Logging from metax import Utilities from metax import Formats from timeit ...
de3a08f2edfcce973a6dd5751ccc9d0931b868c16294685ca9bea6956f657521
Python
14,118
422
import numpy as np # Colours and types Types = np.array(["T4", "T5"]) Type_colours = np.array(["#17becf", "#ff7f0e"]) Subtypes = np.array(["T4a", "T4b", "T4c", "T4d", "T5a", "T5b", "T5c", "T5d"]) Subtype_colours = np.array( [ "#1f77b4", "#9edae5", "#98df8a", "#bcbd22", "#d6...
5cd920aa6abd6c04b73638958f16c6201c71827b4e4e8c9f495dc50e11cf3b73
Python
14,124
344
"""Controller for manual behaviour-file parsing and UI table updates.""" from __future__ import annotations import re import uuid from pathlib import Path import pandas as pd from PySide6.QtWidgets import QMessageBox from src.data.behaviour_settings_io import ( load_behaviour_static_inputs, save_behaviour_s...
8e55c789835ed7b576fba5cb93696f31c8789de074f724469dd8594aadced5a8
Python
14,129
482
from scipy.spatial import KDTree import numpy as np import matplotlib.pyplot as plt from matplotlib.lines import Line2D from matplotlib.patches import Patch from collections import Counter import jax import jax.numpy as jnp from graph_tool.all import Graph from graph_tool.topology import max_cardinality_matching from...
10d5525472115619fb7c182caa854326c693f60271b622a55848e5a8b0f33b2d
Python
14,130
483
from scipy.spatial import KDTree import numpy as np import matplotlib.pyplot as plt from matplotlib.lines import Line2D from matplotlib.patches import Patch from collections import Counter import jax import jax.numpy as jnp from graph_tool.all import Graph from graph_tool.topology import max_cardinality_matching from...
4df4dc1ecc96eaa928b2489363e9e54b457d67a6b20dbd3a256a98487388966d
Python
14,138
394
import os import anndata import mudata import numpy as np import pandas as pd import pytest from scvi import REGISTRY_KEYS from scvi.data import synthetic_iid from .utils import generic_setup_mudata_manager def test_setup_mudata(): adata = synthetic_iid() adata.obs["cont1"] = np.random.normal(size=(adata.s...
b421e6f5310b9f12248b324715ce3527cfd752b919afe9adcf713fb18d5031fc
Python
14,138
364
from __future__ import annotations import json import os from dataclasses import asdict, dataclass, field from typing import TYPE_CHECKING from scvi.data import AnnDataManager from scvi.data._utils import _is_minified from scvi.model.base._save_load import _load_saved_files from scvi.utils import dependencies from ....
be1af88617ee4358b958095a81aa26d8592a89976e8ad9c4f04cf3735cf0f8b4
Python
14,138
338
''' By K. Butenko ''' import os import sys import numpy as np from scipy.stats import qmc import csv import h5py import json from scipy.optimize import minimize # hardwired: max total currents allowed one_pol_current_threshold = 7.0 # in mA total_current_threshold = 7.0 abs_current_threshold = 7.0 def create_m...
c47dc7cd178f0154adaf2048e8dff4b23d22e4de9b9866f5e0ce735b529dad66
Python
14,139
424
import numpy as np import pandas as pd # Colours and types Types = np.array(["T4", "T5"]) Type_colours = np.array(["#17becf", "#ff7f0e"]) Subtypes = np.array(["T4a", "T4b", "T4c", "T4d", "T5a", "T5b", "T5c", "T5d"]) Subtype_colours = np.array( [ "#1f77b4", "#9edae5", "#98df8a", "#...
8adbfff095c41a6bde4cad25af2b53edace7d4b38803bc1c0e3a54cbfb0133fa
Python
14,146
384
import logging from importlib.machinery import SourceFileLoader import inspect import os from collections import defaultdict from contextlib import contextmanager import mdt import mot from mdt.configuration import get_config_dir from mdt.model_building.signal_noise_models import SignalNoiseModel from mot.library_funct...
eccde33514cd08b0331da7a818f6ba21e6c3323b10bde6fec3c04ad8a2a56598
Python
14,151
408
from __future__ import annotations import warnings from typing import TYPE_CHECKING import anndata as ad import numpy as np import pandas as pd if TYPE_CHECKING: from typing import Literal from anndata import AnnData from scvi import settings from ._constants import CYTOVI_SCATTER_FEATS from ._utils impor...
b73c5b5d0b9828dce893ff8fe7704b6a33908357e525ea630409591b7a9393d2
Python
14,157
397
#!/usr/bin/env python3 -u # 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. """ Generate n-best translations using a trained model. """ import os import subprocess from contextlib import redi...
39d4f48893f919664d5ccbddfea19b7ef425e2cc28e6ecfcccd170b7ae227e64
Python
14,162
341
from __future__ import annotations import logging from collections.abc import Callable from pathlib import Path import pandas as pd from PySide6.QtCore import Qt from PySide6.QtWidgets import ( QFileDialog, QFrame, QGridLayout, QHBoxLayout, QInputDialog, QLabel, QPushButton, QSizePolic...
c0ec6a22fd1261aea96b2e73595459c3329e11dc20dc59e89b0122b2a0e1339e
Python
14,162
451
from __future__ import annotations import os import uuid from copy import deepcopy from hashlib import sha1 from pathlib import Path from typing import TYPE_CHECKING from typing import TypedDict from urllib.parse import urlparse from urllib.parse import urlunparse import pytest from dulwich.client import HTTPUnauth...
82c945e75d731c8fce6d1063d88e643056f0c50979cf497f9ef45acef73e5198
Python
14,174
386
# 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...
ea99541efba2a0fc02f046ebeebfa29475ecc2fe9071f9cd496c946ef2aa94b2
Python
14,175
314
"""Gradio-free TotalSegmentator backend for the SegCT/MRI workflow.""" from __future__ import annotations import csv import importlib.metadata import json import platform import shutil import subprocess import sys import tempfile import zipfile from collections import defaultdict from pathlib import Path import niba...
b8695064a752c5b734c885fb0a295a184e9834ac0df669de14c3de4732330919
Python
14,176
424
import numpy as np import pandas as pd import statsmodels.formula.api as smf # Colours and types Types = np.array(["T4", "T5"]) Type_colours = np.array(["#17becf", "#ff7f0e"]) Subtypes = np.array(["T4a", "T4b", "T4c", "T4d", "T5a", "T5b", "T5c", "T5d"]) Subtype_colours = np.array( [ "#1f77b4", "#9...
12f61201e0730175cdbc2c75ca4e222247df952b40a715849f3b62b7cab6e1f9
Python
14,178
426
import numpy as np import pandas as pd import statsmodels.formula.api as smf # Colours and types Types = np.array(["T4", "T5"]) Type_colours = np.array(["#17becf", "#ff7f0e"]) Subtypes = np.array(["T4a", "T4b", "T4c", "T4d", "T5a", "T5b", "T5c", "T5d"]) Subtype_colours = np.array( [ "#1f77b4", "...
5d9e92d056180c279d702e4744ecf28b4aedc2261253edac9647a90c9e6f3bfe
Python
14,180
490
from scipy.spatial import KDTree import numpy as np import matplotlib.pyplot as plt from matplotlib.lines import Line2D from matplotlib.patches import Patch from collections import Counter import jax import jax.numpy as jnp from graph_tool.all import Graph from graph_tool.topology import max_cardinality_matching from...
559b31f1af81740fe6cbd57dc8e21ff0a4f719a2c9a1ac5b789a0c18429fbf12
Python
14,186
339
from __future__ import annotations import logging import re from typing import TYPE_CHECKING from typing import Any from poetry.config.config import Config from poetry.config.config import PackageFilterPolicy from poetry.console.exceptions import ConsoleMessage from poetry.console.exceptions import PoetryRuntimeErro...
ff84b56c41308b2b2f09c3085e93827d0fa61d30927b9728a071bafc03fd925a
Python
14,187
483
from scipy.spatial import KDTree import numpy as np import matplotlib.pyplot as plt from matplotlib.lines import Line2D from matplotlib.patches import Patch from collections import Counter import jax import jax.numpy as jnp from graph_tool.all import Graph from graph_tool.topology import max_cardinality_matching from...
f2af025bceec68f5bd9abc7598924e00a53c0a0164b5d68bd4e75cfdcbd858d9
Python
14,189
424
import numpy as np import pandas as pd import statsmodels.formula.api as smf # Colours and types Types = np.array(["T4", "T5"]) Type_colours = np.array(["#17becf", "#ff7f0e"]) Subtypes = np.array(["T4a", "T4b", "T4c", "T4d", "T5a", "T5b", "T5c", "T5d"]) Subtype_colours = np.array( [ "#1f77b4", "#9...
1f1c56b2148404eebd8400a330b34036daa1578411d2a1f0fce38a21f99ab2bf
Python
14,190
424
import numpy as np import pandas as pd import statsmodels.formula.api as smf # Colours and types Types = np.array(["T4", "T5"]) Type_colours = np.array(["#17becf", "#ff7f0e"]) Subtypes = np.array(["T4a", "T4b", "T4c", "T4d", "T5a", "T5b", "T5c", "T5d"]) Subtype_colours = np.array( [ "#1f77b4", "#9...
a5b0e162692ba057fe981bc8a89640abe1f77b00d4b5d60f82b07e4418b1629c
Python
14,194
367
from collections import OrderedDict import theano.tensor as T from lasagne import utils __all__ = [ "Layer", "MergeLayer", "IdentityLayer", "SplitLayer", ] # Layer base class class Layer(object): """ The :class:`Layer` class represents a single layer of a neural network. It should be ...
51a0e29e4ef90970133be8771e7b4f9bc064fcc67d9d3d59a0459aad207313f6
Python
14,200
426
import numpy as np import pandas as pd import statsmodels.formula.api as smf # Colours and types Types = np.array(["T4", "T5"]) Type_colours = np.array(["#17becf", "#ff7f0e"]) Subtypes = np.array(["T4a", "T4b", "T4c", "T4d", "T5a", "T5b", "T5c", "T5d"]) Subtype_colours = np.array( [ "#1f77b4", "#9...
a909a4e02f979f611617be46728414618b0d758c8eb0693adbc05db5eb0de5ac
Python
14,203
426
import numpy as np import pandas as pd import statsmodels.formula.api as smf # Colours and types Types = np.array(["T4", "T5"]) Type_colours = np.array(["#17becf", "#ff7f0e"]) Subtypes = np.array(["T4a", "T4b", "T4c", "T4d", "T5a", "T5b", "T5c", "T5d"]) Subtype_colours = np.array( [ "#1f77b4", "#9...
7dde29df25afad8320600f8165ccdbfc702c83d8a901d9a08691ec8e0a3f7f1e
Python
14,206
426
import numpy as np import pandas as pd import statsmodels.formula.api as smf # Colours and types Types = np.array(["T4", "T5"]) Type_colours = np.array(["#17becf", "#ff7f0e"]) Subtypes = np.array(["T4a", "T4b", "T4c", "T4d", "T5a", "T5b", "T5c", "T5d"]) Subtype_colours = np.array( [ "#1f77b4", "#9...
858041c562e0ab2df7a84134009793602b78dfe2df96cac6f899ff7b388993b5
Python
14,209
392
from functools import partial import haiku as hk import jax import jax.numpy as jnp import pytest from jax import random from jax.random import normal from oneqmc import Molecule from oneqmc.geom import masked_pairwise_distance from oneqmc.sampling.samplers import ( DecorrSampler, LangevinSampler, Metropo...
f6db3e78e39a30e4aa0ee9e870bffaf7415d92c2b7234d5a4932422a586f886e
Python
14,213
425
import numpy as np import pandas as pd import statsmodels.formula.api as smf # Colours and types Types = np.array(["T4", "T5"]) Type_colours = np.array(["#17becf", "#ff7f0e"]) Subtypes = np.array(["T4a", "T4b", "T4c", "T4d", "T5a", "T5b", "T5c", "T5d"]) Subtype_colours = np.array( [ "#1f77b4", "#9...
3edf6be5e9ce079151c941cd1e9d617520dc0426ceab835b3021a2bf875eff58
Python
14,214
426
import numpy as np import pandas as pd import statsmodels.formula.api as smf # Colours and types Types = np.array(["T4", "T5"]) Type_colours = np.array(["#17becf", "#ff7f0e"]) Subtypes = np.array(["T4a", "T4b", "T4c", "T4d", "T5a", "T5b", "T5c", "T5d"]) Subtype_colours = np.array( [ "#1f77b4", "#9...
5da4a9ee7c8c6987681890e091df7e3e05b8e8eef452cdc1a17385fcb460d878
Python
14,214
426
import numpy as np import pandas as pd import statsmodels.formula.api as smf # Colours and types Types = np.array(["T4", "T5"]) Type_colours = np.array(["#17becf", "#ff7f0e"]) Subtypes = np.array(["T4a", "T4b", "T4c", "T4d", "T5a", "T5b", "T5c", "T5d"]) Subtype_colours = np.array( [ "#1f77b4", "#9...