sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
b430a8068a9048d15346bdddb4a1e1e5490a089ff1efb6ea5e028884a95551d4
Python
8,535
189
import glob import pylab as pb import os from collections import defaultdict import numpy as np import argparse import pandas as pd import seaborn from scipy.stats import mannwhitneyu, ks_2samp, ttest_ind from tqdm import tqdm from mp_dip.obci_readmanager.signal_processing.tags.read_tags_source import FileTagsSource...
cfd3369677dbd305233df1ddf416882bec31f5e6b1145fde1a9c7400da464dd0
Python
8,535
240
""" Functions to compute wavelets decomposition of a time series. The main function for doing wavelet decomposition is `nap.compute_wavelet_transform` For now, pynapple only implements Morlet wavelets. To check the shape and quality of the wavelets, check out the function `nap.generate_morlet_filterbank` to plot the ...
40e5b17f191f309f44db4ba51cddf071e2b8f63a0a082f6f599b53593612d72f
Python
8,536
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "contour.colorbar...
b48bf93db6139466e99d4c165796ed02c39faa3813864ceb805f30a278c151f5
Python
8,536
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "surface.colorbar...
f4d819b7bb93307cfbd3ff0c8a87e4921d2213f0078785a41b6ff36ff5d3225a
Python
8,536
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "heatmap.colorbar...
bcf064b27d1572355953c7d352e5c5788e9b5281517250bc83729ce64f94c3fb
Python
8,538
204
"""Generation of auxiliary datasets.""" import os import numpy as np import tensorflow as tf from tqdm import tqdm from angorapy import make_task from angorapy.agent import PPOAgent from angorapy.common.const import VISION_WH def _bytes_feature(value): """Returns a bytes_list from a string / byte.""" if isi...
aee98ff8cf1800682b5dcdb1c0e2ad0ade0e9acfa43bad0cc6793660ac3d1d81
Python
8,539
209
# SOURCE: vendored from ShlezingerLab/SubspaceNet @ main # https://raw.githubusercontent.com/ShlezingerLab/SubspaceNet/main/src/models.py # https://raw.githubusercontent.com/ShlezingerLab/SubspaceNet/main/src/utils.py # # SubspaceNet: model-based deep learning for DoA (direction-of-arrival) estimation. # "SubspaceNet: ...
77ddfac9a584cfa9ecb9c9d4e08435ed28c56ce08ca2f95a5a3eda7f97fa3b09
Python
8,543
244
from __future__ import annotations import multiprocessing import sys import threading import time import pytest import env from pybind11_tests import gil_scoped as m class ExtendedVirtClass(m.VirtClass): def virtual_func(self): pass def pure_virtual_func(self): pass def test_callback_py_...
db79ea592a4afd79b251cb2b777067ecd8c58adfd484beae36f723091c2605ad
Python
8,543
208
# Copyright (c) 2022 PaddlePaddle 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 app...
84a30b24cf68321962c925a6ca0f3badaf4b0b01b1188fe413699f26dab45fa2
Python
8,544
234
"""DMR: Deep Match to Rank for Sequential CTR Prediction. Lv et al., AAAI 2020 (Alibaba). Paper: https://ojs.aaai.org/index.php/AAAI/article/view/5346 "Deep Match to Rank Model for Personalized Click-Through Rate Prediction" Source: https://github.com/lvze92/DMR (TF1 official); PyTorch port: https://git...
bf2629bf54d83ac9d3a3405ec7ab28dadaede7e5796bfddbc178c7e7e9890f49
Python
8,546
254
from plot_utils_DIM import * from plot_utils_AUD_RSA import load_rsa_scores_across_layers_across_models """ Script for: 1. comparing dimensionality (as computed in dimensionality_all_models.py) vs scores across layers, across all models """ ### Directories ### # Logging date = datetime.datetime.now().strftime("%m%d...
0111be7c1c26a8899fc9a582228fe1cdab1a696ea07ce3b66e7a1c15737aac2e
Python
8,547
204
"""Pre-release field registrar mechanism (persistence-schema seam S3). New portable fields land declared ``FieldPolicy.DROP`` under the current tlspec version and register with :mod:`torchlens._io.prerelease`. This module proves the three mechanism guarantees: (a) registered (DROP-declared) fields do NOT persist by d...
c07fd3d160b9ce2e476719168c4822dc6993d35adea8f95cc5df869a9ab432ce
Python
8,547
230
"""Generalized and folded receptive-field validation tests.""" from __future__ import annotations from collections.abc import Iterator from unittest import mock import pytest import torch from support.rf_isolation import preserved_rf_registry from torch import nn import torchlens as tl from torchlens.data_classes.o...
3ff5b8ce5ca37312ec685ff811122e5579c2315c7f412b4e78693f4462c0b8ac
Python
8,549
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickformatstop(_BaseLayoutHierarchyType): _parent_path_str = "layout.scene....
a7a4f0a2244a63b90c8877105dd67f10513299901deff9c0773e26b0de67ddeb
Python
8,549
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickformatstop(_BaseLayoutHierarchyType): _parent_path_str = "layout.scene....
a97746fa014bc5afbb23643fa492f7515636dcb256d0b626a9863675fdad5972
Python
8,549
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickformatstop(_BaseLayoutHierarchyType): _parent_path_str = "layout.scene....
97ab37aa04bd17587436e27708c81b942b26cf6e978c3b2a4050ace9320cc40b
Python
8,550
256
#!/usr/bin/env python3 # LICENSE # # _This file is Copyright 2018 by the Image Processing and Analysis Group (BioImage Suite Team). Dept. of Radiology & Biomedical Imaging, Yale School of Medicine._ # # BioImage Suite Web is licensed under the Apache License, Version 2.0 (the "License"); # # - you may not use this sof...
cb86a1818a819e352cc8d9f2d847741b5e7eb99ad30d55389eb770d8df5ef037
Python
8,550
276
""" Copyright (c) 2022 EPFL-BBP, All rights reserved. THIS SOFTWARE IS PROVIDED BY THE BLUE BRAIN PROJECT ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE BLUE BRAIN PROJE...
0830303cb18d3ec638556125bdd6802bf8916e64158bf670e43574816fa281b8
Python
8,551
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "bar.marker.color...
3be11eeec59b9ac39f84ca18b3a014a99f5bc1ed4dd8a3e59badb106bb7798ce
Python
8,551
236
''' a pytorch lightning data module based dataloader, for train/val/test dataset prepare. ''' # %% import matplotlib.pylab as plt from torchvision.transforms import ( Compose, Lambda, RandomCrop, Resize, RandomHorizontalFlip, ) from pytorchvideo.transforms import ( ApplyTransformToKey, No...
51e3958bbb04fb423ffe352783ec2161a0cc87e80e7d324e92aa3d45d702d6b3
Python
8,551
210
#!/usr/bin/env python3 """ Diagnostic J verification — permutation null + bootstrap CI on the two-model ensemble for AD-vs-HC. Observed: LOO BA 0.810, pooled-LOCO BA 0.751. Tests: 1. Permutation null (global label shuffle, 500 iterations): p(null LOO BA >= observed), p(null LOCO BA >= observed) 2. Bootstrap ...
715bfe027c65aba674e7acf2c491c7ba349f421d03a20f7972a9d739bd0e44fb
Python
8,551
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "streamtube.color...
9d3acf2253a6b6313dcd9fac8c85dcaa55cb4d2aeabe3fc26436bc292d36c4b2
Python
8,551
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "isosurface.color...
c74ddc626daa3c8f2c89d120359d4ebb76ce317e33c9fd69148089a15e95aab7
Python
8,551
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "densitymap.color...
e27a48b225c7b928f010bd7a25c8199e9b83ae226676c4a0868868fb013c5a00
Python
8,551
239
import math from typing import Iterable, List, Optional, Tuple, cast import torch import torch.nn as nn from timm.layers.pos_embed import resample_abs_pos_embed from timm.models import _manipulate from timm.models.vision_transformer import VisionTransformer from torch import Tensor, jit from torch.nn import LayerNorm,...
fbeedfbdfaac6ac2e87e9c6373c7daa5f2e8dfe601f774f287c45765dc99540b
Python
8,551
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "choropleth.color...
50e4820ff47e7ebede464ca905ee1f64c44331b62011df861b548da34f617a1c
Python
8,552
239
""" The arena and its spatial boundaries. Defines the experimental space the agents move in, its geometry and dimensions, and the border objects that constrain them. """ from __future__ import annotations from typing import TYPE_CHECKING, Any import agentpy import numpy as np import param from shapely.geometry import...
bef92b2360dbe69fdabf09742bcf6179cfb38a6825cf4b0695bcca366d1e7758
Python
8,552
216
""" This script takes LD matrices and simulates summary statistics for multiple populations. Requires 2 populations, can take up to 4. """ import argparse from contextlib import ExitStack import numpy as np import scipy.stats as stats import os class Main(): def __init__(self): self.ld = [] self.ld_matrices...
919c07babab4fed1e814c6602fb13dffaca6e8459f9e590b86a037302b333290
Python
8,553
231
"""A PEP 517 interface to setuptools Previously, when a user or a command line tool (let's call it a "frontend") needed to make a request of setuptools to take a certain action, for example, generating a list of installation requirements, the frontend would would call "setup.py egg_info" or "setup.py bdist_wheel" on t...
ba64514696ac73a0d07a2ef06f108243f1cb83cbc242689ad5f1687a95049d12
Python
8,553
232
"""Optional smoke coverage for the technical-preview Paddle backend.""" from __future__ import annotations import pytest paddle = pytest.importorskip("paddle") import torchlens as tl # noqa: E402 from torchlens.backends import BackendUnsupportedError # noqa: E402 pytestmark = pytest.mark.backend_paddle def _in...
f1c527c06e4549523d4d57eab99f73fe4bd9233fbc5e7e98aef971568539b268
Python
8,554
170
"""Состояния агентов как struct-of-arrays с переиспользованием слотов. Смерть необратима: слот освобождается, геном исчезает. Никакого респавна. """ import numpy as np from .config import N_MEM from .brain import Brains class Population: def __init__(self, cfg, rng, world, ancestor=None): self.ancestor =...
2687f8279fe323bd74f00ed655ae921e03b644cf757b9a10b494b987e576e9ef
Python
8,556
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "histogram2d.colo...
ee2a26fbfb9c4aebe10bd33fce3356af3540b9b940a9d37e6fdb1f53270f059b
Python
8,556
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "indicator.gauge....
bf8816e2dede85563c77c313c9afda05c16cfa7a8381005620da239e29bf1371
Python
8,558
215
import os import json from pathlib import Path from tempfile import TemporaryDirectory import numpy as np from scipy.special import logit from tns.astrocyte.grower import AstrocyteGrower from morph_tool import diff _path = Path(__file__).parent / 'data' def _parameters(): return { "basal": { ...
2a7424bc85aeb8b78fd1630e07f5303c54b554a9d9317761ecd1aae701f2c4dc
Python
8,559
232
"""A06 capture-options truth: ``stop_after`` wired through the halt engine. WALKTHROUGH list-A row 10 (third clause): ``stop_after=`` was a universal silent no-op whose docstring claimed pluck support ("validated"), while the trace path raised ``NotImplementedError`` and pluck accepted-and-ignored it. The wired semant...
4b0b6969afcc8e5d95a2de71ce77061882d2b0c0653b4c8ccc3f867d5626b9e6
Python
8,559
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickformatstop(_BaseLayoutHierarchyType): _parent_path_str = "layout.ternar...
c72a2b5376f069f1f2d248b7fdb174572cdf521c721e93948fc2cf60c58bca4e
Python
8,559
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickformatstop(_BaseLayoutHierarchyType): _parent_path_str = "layout.ternar...
f1132c1aa81baf4a70516421c7ede0dff668e6e4c7a6a13d69c1c10252669090
Python
8,559
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickformatstop(_BaseLayoutHierarchyType): _parent_path_str = "layout.ternar...
28b42a06ee498e18a69af5b572b87c8d89656982917348f3d006e6e79a1fa231
Python
8,561
210
# pylint: disable=line-too-long """ Utility functions for task """ from timeit import default_timer as timer import torch from torch.nn import functional as F from .. import coot_utils from ..coot_utils import compute_constrastive_loss, compute_cmc_loss from ..coot_utils import unpack_data def train_coot(config, bas...
53223ee7ad7f99788c9fd887727d0a2a59fb7eaa4f179ddf8d55804166bb8f3a
Python
8,561
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "splom.marker.col...
f1dc3dc7d7869bfdfc669c09e40172631bd6987557261b7937f8c87734b29236
Python
8,561
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "parcats.line.col...
f8a98b6d458ec8a662161442eab61ddff2bf251e11944001570c864e8712e4a8
Python
8,563
240
from torch import nn import torch from .utils import unsorted_segment_sum def initialise_weights(model: nn.Module): """Initiallises the weights of a custom model using the globally set seed. Usage: model.apply(initialise_weights) :param model: Model that is to be initialised :type model: nn.Modul...
ebb17ac671ac32ef24a5718d18af9384efaaeb786a258d4340fc9e88fa94fc32
Python
8,564
227
# coding=utf-8 # Copyright 2024 The Google Research 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 applicab...
07fd10cc0cdc89088e0c3aec1cd39c66591b64408ab6fe0ffbd03f43e3adbad8
Python
8,566
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "quiver.marker.co...
47f578a23274f190cdfad165593c62fad72943cb2a78414b22a61e86337c0af7
Python
8,566
221
import torch from torch import nn import dgl.function as fn from dgl.nn.functional import edge_softmax from dgl.utils import expand_as_pair from graphmae.utils import create_activation class DotGAT(nn.Module): def __init__(self, in_dim, num_hidden, out_dim, ...
61657025e594c7568dffc11066eda292c6c6394ea8db8b5cfb5f4d369e0c61e6
Python
8,566
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "funnel.marker.co...
a3d26a998e3a268ecf83e7ffbeb8c0e61c6365525932c3c035908453000d1ce1
Python
8,566
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "icicle.marker.co...
ae2c885d6b73d4c652b9bd79622286f2bf2af3632a16f846a215ee2cb6278bed
Python
8,566
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "choroplethmap.co...
c47e585648f2a2de65ba669e022b5a834fad6efbc1475c5e44a555cc3bb87908
Python
8,566
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "contourcarpet.co...
0488f1e5a7f26b79d0374e257867eda7557221d1e7f78e7e7bbb7e23eb2b41db
Python
8,568
229
import pytorch_lightning as pl import torch from survival_plus_x.models.cox_lightning import CoxHead from survival_plus_x.models.cox_lightning import metrics_from_step_outputs as cox_metrics from survival_plus_x.models.lognormal import LognormalHead from survival_plus_x.models.lognormal import metrics_from_step_outpu...
56e0b525784a59035ffe3a75294360ba2965ad8a5fc5845c9a9db113e5350187
Python
8,569
193
"""F32 folded rider: listA rows 17/21 evidence at REAL HF causal-LM tier. Both rows shipped with toy-only evidence and the excuse "real-model runnable saves blocked by row 2 Cache defect". FIX-A (lane A05) landed, so a runnable save of a real HF causal-LM works; this file upgrades the evidence: * Row 17 (weight-free ...
61dd6750a969d91995a8607ba18f35cfcd915f3dc976ff1cb5a6da58f429752f
Python
8,569
254
# -*- coding: utf-8 -*- # # samtools documentation build configuration file, created by # sphinx-quickstart on Wed Aug 12 14:43:42 2009. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
053c3ada537969e12f745b2524dbbdb7eff0f7aa8d27464b85ab105f6f10af34
Python
8,571
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "parcoords.line.c...
108711bad7002c0471c1266439afe7f0fae624396b9e7d8748c1922b842d7131
Python
8,571
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "scatter.marker.c...
369a1e8e357424114f88f5d94d5eddc98fc9f44258c4dbb7cc27576c2932f837
Python
8,571
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "scatter3d.line.c...
c637cc2676a5847c41791d30917d5d0c76eb4f0f652c7f5a51dbbb29ac8690a5
Python
8,571
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "treemap.marker.c...
d828364c8735bf020fd45f7e8b962d3a32562d63c2411ac0c43f329d61b01a0a
Python
8,571
249
"""Tests for the logit-lens appliance and the language_model_head recipe.""" from __future__ import annotations import pytest import torch from torch import nn import torchlens as tl from torchlens.semantic import LogitLensError, logit_lens from torchlens.utils._torch_compat import HAS_RMSNORM_MODULE _requires_rmsn...
139e203aad4e6c3fe4756f7da30e10bac8d92a3499cad19e93c54248c5e0ca4b
Python
8,572
204
""" This module define the data factory """ import logging import torch import pandas as pd import collections from datasets_pre_processing.classification_per_prot_dataset import ( ClassificationPerProtDataset, ) from datasets_pre_processing.classification_per_prot_GO_term import ( ClassificationPerProtGOTerm, ...
2b3d69b02804e889c2d2b84c48d84a6bd957f18a5952006a13a149b563cb9758
Python
8,572
211
from __future__ import annotations import copy import torch from pytorch_lightning import LightningModule from timm.models.vision_transformer import vit_small_patch16_224 from torch import Tensor from torch.optim import AdamW from lightly.loss import CAPILoss from lightly.models import utils from lightly.models.modu...
2e8304b1c080c672c92e92a22ccf6653173f89d528d45dca9414456e01f325a1
Python
8,572
239
import locale import dateparser import gc from camelot.utils import split_textline locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') try: from local_extractor.utils import common_utils from local_extractor.utils.table_concatenation import concatenate_tables from local_extractor.states.state_utils import KA_...
6004f94977ea0f5d251bff03593df6e0e759ee39c1f74f0073c81469a1f8ba2c
Python
8,573
204
"""Written by @Jinerhal, adapted by @Xiaojieqiu. """ from typing import List import cv2 import numpy as np from anndata import AnnData from ..configuration import SKM from ..logging import logger_manager as lm from .contour import * from .utils import * @SKM.check_adata_is_type(SKM.ADATA_UMI_TYPE) def get_borderli...
97f7431c688ec63f125696cf9410c0db3dfb2d644a2fd9501bf9e5ed5bfb85d0
Python
8,573
207
#!/usr/bin/env python3 """ Dx AH — lean 10-feature tool variant. Drop the 5 most redundant features identified in Dx AF feature ablation (features whose removal had ΔAUC ≥ -0.005): - DFA (ΔAUC +0.003 when dropped) - I_R (ΔAUC +0.001) - dPLI alpha global (ΔAUC +0.001) - org (ΔAUC -0.002) - iPLV alpha global (...
5945ac274f854c68a15d8abd9bcfb83ff54abfee2574c7fdd158e9c2e0c7bf16
Python
8,574
233
from . import multiprocess_util as mu from . import math_util as ma from . import io_util as io import numpy as np import traceback from scipy.stats import rankdata def main(n_cpus, data, affine, header, norm, brain_mask, output_name, six_f, reho): # Determine n_items and n_cpus n_items, n_cpus, dn = ...
6eb3efa203f63f4b91b9ca2a45e16a2af30aa0e02df920ef6ebf983bfb0c55cb
Python
8,574
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickformatstop(_BaseLayoutHierarchyType): _parent_path_str = "layout.polar....
8b68c573417ec739b3b5360f2d64a60a84332829a1a9f61eb71a1f65bc142e10
Python
8,574
202
#!/usr/bin/env python3 """ Dx AB — investigate the wide bootstrap CI lower bounds in Dx AA. The Dx AA verification produced AUC = 0.956 [0.710, 0.980]. The lower bound 0.710 is uncomfortably wide. Investigate: 1. Distribution shape of bootstrap AUC values: bimodal (with a few "unlucky" resamples driving the ta...
0ae25eda971f2e1c7673cbdc4cc8903d433392f7bc35b1fff81b741cb4114794
Python
8,575
230
# 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...
d98a172fdf99fedf35de5512cb0af61e218827f63dd330e857668812d9225432
Python
8,576
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "barpolar.marker....
db2b45d563ebb86d3f7e36f04b5702be441934d55783bf6e64ae8684b4fd5c0b
Python
8,576
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "sunburst.marker....
830bf0ce3ac731a55313c4d045c9fe8792c7e615da93a33f4b0c0db2a5654969
Python
8,577
262
from datetime import datetime import torch import numpy as np from modular_splicing.utils.io import load_model, save_model from modular_splicing.utils.construct import construct from modular_splicing.evaluation.evaluation_criterion import ( evaluation_criteria_specs, ) from modular_splicing.evaluation.run_evalua...
a9d1f06070efe479d2ce42381ef09773ec9a035f38ccd9d1c8f256d37529b3ec
Python
8,577
192
import cc3d import numpy as np import SimpleITK as sitk from collections import OrderedDict from radiomics import featureextractor, imageoperations import csv import tifffile as tiff from tic_toc import TicTocGenerator, tic, toc import ray import sys import getopt @ray.remote def split_volume(image, mask,...
b2852888fb2c8f897e05504a56ef595c9bef5f3bb25d79a066205cc8a9c1ed01
Python
8,578
224
#!/usr/bin/env python import codecs import os import re import sys import tarfile import threading import unicodedata import urllib from glob import glob from multiprocessing.pool import ThreadPool from os import makedirs, path import pandas from bs4 import BeautifulSoup from tensorflow.python.platform import gfile fr...
20c43c2734eec6384d07ff3c9b13a1e2b3e8af1b0aa5a7495b668f85c233f7a2
Python
8,579
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickformatstop(_BaseLayoutHierarchyType): _parent_path_str = "layout.polar....
58ef5a7640edb757494b57169af8bbb2251d09c048d739edc48533ae0ba028f4
Python
8,580
296
from __future__ import annotations import contextlib import os import string import subprocess import sys import tarfile import zipfile # These tests must be run explicitly # They require CMake 3.15+ (--install) DIR = os.path.abspath(os.path.dirname(__file__)) MAIN_DIR = os.path.dirname(os.path.dirname(DIR)) PKGCON...
2a23d5727af0610eb0a782dbb9611b188479f64261d814ceae68e31349c2fb5a
Python
8,581
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "histogram.marker...
52089090f21777283f4d046fad3d2ac09f78e4944eb2361ea1007b4767def80a
Python
8,581
244
model = dict( type='FasterRCNN', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=0, norm_cfg=dict(type='SyncBN', requires_grad=True), norm_eval=False, style='pytorch', init_cfg=dict(type='Pretra...
9daa6dd85ffbcace26468668c5dae77f107584a10646c294ca60ac4bf196e29e
Python
8,581
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "scattergl.marker...
c82bc76c515251865226fbaf80b7a0ce91b10825b14cb475691aba4a61d0f101
Python
8,581
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "scatter3d.marker...
b6183dc26b43e0cf580feee797d894f79fa69ff74b1ec4f8c676726783c72aeb
Python
8,582
253
#!/usr/bin/env python3 """ File: evaluate_model_term_importance.py Created: 2022/05/09 Last Changed: Author: M.Vochteloo Copyright (C) 2020 University Medical Center Groningen. A copy of the BSD 3-Clause "New" or "Revised" License can be found in the LICENSE file in the root directory of this sour...
6480d9e2eaa63277b764fffb10f021cfb0a97929007e48bd0aa891bc3d612b05
Python
8,583
249
import os import matplotlib.pyplot as plt import seaborn as sns from os.path import join import sklearn from sklearn.tree import DecisionTreeClassifier from tqdm import tqdm import pandas as pd import pickle as pkl import sys import numpy as np import pandas as pd from collections import namedtuple from sklearn.tree._t...
096bcc286c24f30f022d51def4b870849905ab798a924ba744801221d07c9132
Python
8,584
272
"""Internal chunked-forward helper functions for public trace capture.""" from __future__ import annotations import collections.abc import time from typing import Any from ._deprecations import MISSING from ._trace_state import TraceState from .data_classes.trace import Trace from .fastlog.options import HaltPredica...
2eb854ab4621bc882036c320c3a1a2a7def29ecbeaee7170561b1b0e277a84a9
Python
8,584
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickformatstop(_BaseLayoutHierarchyType): _parent_path_str = "layout.colora...
bea0d2436e11f4c8f6c5433d40896bb09d0b0627df15413b84814a1fb9885806
Python
8,585
220
""" Loads and handles the application menu bar SimplyFire - Customizable analysis of electrophysiology data Copyright (C) 2022 Megumi Mori This program comes with ABSOLUTELY NO WARRANTY This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as...
80e1f1020e92a6786b54f81f09adf930ad60982163e3a43bca576f6fdf21690f
Python
8,586
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "scattergeo.marke...
ae505d13c220a55ef0084cc10c706361c70d9b5847364023131eeb649e9c6275
Python
8,586
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "scattermap.marke...
02c450ed0d9cc1d9ccc4012ca56201afd646c376319d1f624f8a57b6c7d8ee55
Python
8,589
253
"""Tests for callable NodeSpec visualization customization.""" from __future__ import annotations from types import SimpleNamespace from typing import Any import pytest import torch from torch import nn import torchlens as tl from torchlens.data_classes.layer import Layer from torchlens.experimental.dagua import No...
4cc5bb2abcb72094909fa0db1ff2dcc9421bc0a76db2d2262180db2826582222
Python
8,589
263
"""Utility functions for BData.""" from typing import List import copy import numpy as np from .bdata import BData def vstack(bdata_list, successive=[], metadata_merge='strict', ignore_metadata_description=False): """Concatenate datasets vertically. Currently, `concat_dataset` does not validate the cons...
0200d188c6e2a67eec96be7f211227b624fbb5c9aa9b769f9defb714b7f2a3a9
Python
8,590
307
import ctypes import fnmatch import json import os import sys import warnings import numpy as np import tifffile PLAT = sys.platform if PLAT == "linux2": PLAT = "linux" elif PLAT == "cygwin": PLAT = "win32" class dotdict(dict): """dot.notation access to dictionary attributes""" __getattr__ = dict.g...
39206ef37ef0bf27f0f4d0808239c236216b5b6ac703b544d2809701e8038bd5
Python
8,591
249
import torch import torch.nn as nn import torch.utils.model_zoo as model_zoo from .custom_modules import SequentialWithArgs, FakeReLU __all__ = ['ResNet', 'resnet18_openselfsup_transfer', 'resnet34_openselfsup_transfer', 'resnet50_openselfsup_transfer', 'resnet101_openselfsup_transfer', 'resnet152_openselfs...
41c08dcecb88f75b2742fc7baefd6e11f3f233fa5674bfd9c65663981e01ab45
Python
8,591
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "histogram2dconto...
4866d8fe04614898fe4e722f2da197f2cbdd9c8f27974d548953c14a2234c96b
Python
8,593
210
"""Faster RCNN default config""" # pylint: disable=unused-variable,missing-function-docstring,bad-whitespace,missing-class-docstring from typing import Union, Tuple, Any from autocfg import dataclass, field @dataclass class FasterRCNN: # Base network name which serves as feature extraction base. base_network :...
51ff8cf1e86afa2a4eeca1b561d5950d6932db19d27a067286fb422f035cc71b
Python
8,596
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "scatterpolar.mar...
7bcaa0043fa6da27590379c44b857a3df3bce6ed21f22675ad059b2c8c04fcb9
Python
8,596
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "scattersmith.mar...
4ed808ebc87b6aa23dda833ee7ec64360d22cf9cde21bf08e36b582c9cf18b6d
Python
8,597
255
import h5py import numpy as np from permacache import permacache, drop_if_equal import scipy.sparse from modular_splicing.dataset.additional_data import AdditionalData from modular_splicing.utils.intron_exon_annotation import to_intron_exon_annotation from .pipeline import eclip_dataset_with_spliceai_pipeline from ...
7cb2ca2023b541f1e9e94f9bd9ed52c256f7d66d5ef10291de2be71aa374a4e3
Python
8,597
180
# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to...
c03f2c8f08a3b12e3902a52d287aa28f0c912ad8b4a20db51734fc78c1a7ff50
Python
8,600
125
import unittest from tests.tabulation.nonadiabatic_defect_with_superadiabatic.get_libs import run_slfm, run_eq, get_abs_relerr, get_params, run_inputs_check from spitfire.chemistry.ctversion import check as cantera_version_check import numpy as np if cantera_version_check('atleast', 2, 5, None): class Test(unitt...
9abe9e43f7a47a47ec38e3cfcf5595fe02f3f5ba0e3d711522b084f0bc615904
Python
8,601
241
# --- THIS FILE IS AUTO-GENERATED --- # Modifications will be overwitten the next time code generation run. from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): _parent_path_str = "scattercarpet.ma...
ba690f1ead9e2d2e59c5031511ca96d7568d72f91a7cfb49c3a1d6ad6320810c
Python
8,602
234
#!/usr/bin/env python import codecs import fnmatch import os import subprocess import sys import tarfile import unicodedata import pandas import progressbar from sox import Transformer from tensorflow.python.platform import gfile from deepspeech_training.util.downloader import maybe_download SAMPLE_RATE = 16000 de...
442a18434f6811a78339ee2fb66968e344ed698853f1112a34e9dca026ef2683
Python
8,603
207
"""Registry-kernel lifecycle, epoch, snapshot, and refusal gates (C01 item 13). The kernel is PRIVATE plumbing (architecture memo 6.1): these tests exercise the lifecycle law every typed public door inherits -- register / unregister / list / info / snapshot, monotone epoch, collision refusal by default, capability row...
71755b730ab2a3bad009aa7afd1239f1ee8e5e4494c9e1d22ed2a4a22ac0280f
Python
8,603
227
"""F11 typed-event-ladder gates (collapse memo item 9 / D8). One ladder serves auto, float levels, and the public schedule: geometric interior t, strict monotonicity, coalesced no-op stops, byte-identical endpoints, and the unfrozen auto contract with the band-miss disclosure. """ from __future__ import annotations ...
4a50cabb0344ff0b5026cf64567f408b7293403130e895409953e843b7a93fab
Python
8,604
253
"""Wasserstein distance would be calculated by ot python package, see following: Rémi Flamary, Nicolas Courty, Alexandre Gramfort, Mokhtar Z. Alaya, Aurélie Boisbunon, Stanislas Chambon, Laetitia Chapel, Adrien Corenflos, Kilian Fatras, Nemo Fournier, Léo Gautheron, Nathalie T.H. Gayraud, Hicham Janati, Alain Rakotoma...