sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
39f9c081c172873d37346ae5053c730ff96ff28debed74e69a1f27d8d92f1757 | Python | 11,086 | 349 | # --- 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 Font(_BaseTraceHierarchyType):
_parent_path_str = "sankey.link.hoverlabel"
... |
5af50a53731e314b6556adf8719c2b3763aff0aeb5093ca8cf8064fd1c13f20c | Python | 11,086 | 349 | # --- 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 Font(_BaseTraceHierarchyType):
_parent_path_str = "sankey.node.hoverlabel"
... |
b48317067d7bb22c8eec887eddccaf6deff7f454c6c891b4c70c33058002de8a | Python | 11,086 | 349 | # --- 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 Font(_BaseTraceHierarchyType):
_parent_path_str = "candlestick.hoverlabel"
... |
48b30ad78b11d78d8e8e90429254cd6d11d31c22ca8d52d7a28ac1123a40a527 | Python | 11,087 | 286 | import argparse
import gzip
import sys
import time
import global_data
import pandas as pd
import numpy as np
import os
import json, pickle
from collections import OrderedDict
from rdkit import Chem
from rdkit.Chem import MolFromSmiles
import networkx as nx
from utils import *
from joblib import Parallel, delayed
from t... |
b96aad2fac9dbf9fa3c5d3f95e6933f509cc10e1e88f4444900a67e135696026 | Python | 11,087 | 349 | # --- 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 Insidetextfont(_BaseTraceHierarchyType):
_parent_path_str = "bar"
_path_s... |
c54eb447d4dadd1d0261e04b0a1222934b919950fc9c97f38b5e22f792c030b8 | Python | 11,087 | 265 | import uuid
from contextlib import AbstractContextManager
from typing import List, Union
from dependency_injector.providers import Callable
from fastapi import HTTPException
from sqlalchemy import and_, func
from carbonserver.api.domain.runs import Runs
from carbonserver.api.errors import EmptyResultException
from ca... |
0c8e549e1c21bde97c72214b192292e33b9b8b4a56428d37e5f85a3c239480c7 | Python | 11,088 | 313 | import glob, os
import numbers
import numpy as np
from numpy.lib.stride_tricks import as_strided
from numpy.lib.type_check import imag
from skimage import io
from skimage.filters import gaussian
from typing import Tuple
from shutil import rmtree
from .region_grow import RegionGrowth
UINT16_MAX_ = np.iinfo(np.uint16).m... |
69f57507c2112a30f14e9df1c139deda13a8603c5f9a17eccc2abdbd1f9bdfe6 | Python | 11,091 | 349 | # --- 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 Font(_BaseTraceHierarchyType):
_parent_path_str = "scatterpolar.hoverlabel"
... |
f311aba7c96ff091a9344a209a73d6fcc96eefa8574558af8176f9355ffc1a36 | Python | 11,091 | 349 | # --- 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 Font(_BaseTraceHierarchyType):
_parent_path_str = "scattersmith.hoverlabel"
... |
8bf6a566c99ce8240b26fbcaf4d649ff274e5caa2daac9cf365d1e66f18bcc0e | Python | 11,094 | 349 | # --- 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 Insidetextfont(_BaseTraceHierarchyType):
_parent_path_str = "pie"
_path_s... |
2e0a20cd9de44452b11f25de8185e8725f0a8e12f103f4900ff0bb66f83187da | Python | 11,096 | 349 | # --- 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 Outsidetextfont(_BaseTraceHierarchyType):
_parent_path_str = "bar"
_path_... |
6a7ea0a3db0299fb724664a6a204c8607c7e015797f94cffb432a470b938cb49 | Python | 11,097 | 349 | # --- 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 Font(_BaseTraceHierarchyType):
_parent_path_str = "scattercarpet.hoverlabel"
... |
95a94a7d196e2309347154f07b5ba67efec01077e6a9243092d7cce71b357904 | Python | 11,097 | 349 | # --- 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 Font(_BaseTraceHierarchyType):
_parent_path_str = "choroplethmap.hoverlabel"
... |
baaafb8d049752734b9d2556913278c007fae8e3929aac2cd4f9fabed1c56052 | Python | 11,098 | 275 | """Regression tests for the cert8 (round-8-prep) intervention hardening fixes.
Two BLOCKER-severity bugs found by the cert7 inspector, each a recurrence of a
class a prior round fixed at a *different* site:
* BLOCKER-1 -- ``Bundle._diff_members`` (backing ``Bundle.diff_pair(a, b)``) called
the scalar-only fallback ... |
b1d785bfac782f5eb6c0885d39dea403704544c6133d1e49b587b3c26ed97007 | Python | 11,099 | 283 | import os
import gc
import time
import torch
import numpy as np
from src.read_data import *
from src.get_info_of_rank import *
from src.gpu_sel import *
# used for DDP
import torch.distributed as dist
from torch.nn.parallel import DistributedDataParallel as DDP
# open a file for output information in iterations
fout=o... |
8a3ce11960769b71ad1e735ccdab5f0fe0f8c8ad7cf1d0070645172d92d8e446 | Python | 11,102 | 349 | # --- 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 Font(_BaseTraceHierarchyType):
_parent_path_str = "scatterpolargl.hoverlabel"... |
a7da7a8d49237f1b790a166cbc8710324408eb77a69072cbc3a533623330beb1 | Python | 11,102 | 349 | # --- 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 Font(_BaseTraceHierarchyType):
_parent_path_str = "scatterternary.hoverlabel"... |
c7518d44f811151b3616d595059e959755d2c99ef1bc843a229e457c8515af08 | Python | 11,102 | 349 | # --- 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 Insidetextfont(_BaseTraceHierarchyType):
_parent_path_str = "funnel"
_pat... |
d52d50215e5e1d66be8e0b73455394c082feb76d2e306b2d16c34b120553a0a3 | Python | 11,103 | 349 | # --- 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 Outsidetextfont(_BaseTraceHierarchyType):
_parent_path_str = "pie"
_path_... |
dc100da9cf27dabc0a080a42951e3479da921757f9e66256b8b138f79443ed5f | Python | 11,103 | 383 | """
This module allow to compare multiple xp at once
"""
import matplotlib.pyplot as plt
import seaborn as sns
from analysis.training_analyser import TrainingAnalyser
from utils.utils import save_fig
import numpy as np
class ComparingAnalyser:
"""
This class compare multiple xp
"""
def __init__(self,... |
22a1511cc85d6bb37ee6ceacda0dd82146b8837d6e40ae9a5ef90d0ef3ca9b0c | Python | 11,105 | 265 | from keras.src import ops
from keras.src.quantizers.modes.common import GeometryDispatchStrategy
from keras.src.quantizers.modes.common import add_lookup_lora_delta
from keras.src.quantizers.modes.common import add_reverse_lookup_lora_delta
from keras.src.quantizers.modes.common import apply_bias_activation
from keras.... |
2d9434bc8a879ef31454e970b4765439e4410e8b805de9f3695bccdf7e8a58d9 | Python | 11,105 | 249 | """this script is used to prepare VID dataset for tracking,
which is Object detection from video in Large Scale Visual
Recognition Challenge 2015 (ILSVRC2015)
Code adapted from https://github.com/STVIR/pysot"""
import json
import os
import glob
from concurrent import futures
import time
import argparse
try:
import ... |
2e19eee469c7a0eb09bc7a53572436e66f0421b6d44d39dff4f9e4bbe3eb2911 | Python | 11,106 | 295 | import numpy as np
import copy
from math import sqrt
from scipy import stats
from sklearn import preprocessing, metrics
def get_cindex(Y, P):
summ = 0
pair = 0
for i in range(1, len(Y)):
for j in range(0, i):
if i is not j:
if (Y[i] > Y[j]):
pair += ... |
b4d9727bd619a42869874931dc3356192a78280cc2d2e0c2a3f7b510fa3d83d8 | Python | 11,107 | 275 | #!/usr/bin/env python
"""Find entries in the mypy.ini red list that are no longer needed.
A red list entry is a ``<flag> = False`` line for one of the strict default
flags in a section for a single module, e.g.::
[mypy-galaxy.managers.example]
disallow_untyped_defs = False
The script runs mypy once (per ``--... |
8a40d95ebb5727ab2e33aad5b9eb6892dbc2bd41265636d2db6dd38f0a79420f | Python | 11,108 | 255 | __author__ = 'quentin'
import logging
from ethoscope.stimulators.stimulators import BaseStimulator, HasInteractedVariable
from ethoscope.utils.scheduler import Scheduler
from ethoscope.hardware.interfaces.interfaces import DefaultInterface
from ethoscope.hardware.interfaces.odour_delivery_device import OdourDeliverer... |
91aa129692a41966f20e2e7ab889da8d65e34219cbafc6128992484afec24ee9 | Python | 11,108 | 296 | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.functional import interpolate
import numpy as np
import random
# %%
class torch_myRandAugment(torch.nn.Module):
'''
This is really just the nnU-Net gray value Augmentation but parametrised differently
'''
def __init__(se... |
126dce8bc9013ba8a6bdf500226a0933def5038c84f8916853d5eed6e7fbe8af | Python | 11,109 | 271 | import json
import os
import numpy as np
from keras.src import layers
from keras.src import models
from keras.src import saving
from keras.src import testing
from keras.src.quantizers.quantization_config import Int4QuantizationConfig
from keras.src.quantizers.quantization_config import Int8QuantizationConfig
from ker... |
b4d0b3c954ef0613181a26079c9a90b2090e6f5183f9fa9d663e09083339541e | Python | 11,109 | 349 | # --- 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 Insidetextfont(_BaseTraceHierarchyType):
_parent_path_str = "icicle"
_pat... |
2f208d7f9057c1df854587149dc17780ce7993ee3d4f86aecbd3fbe5aed87284 | Python | 11,111 | 233 | """
SLURM job control via the DRMAA API.
"""
import os
import time
from typing import (
TYPE_CHECKING,
)
from galaxy import model
from galaxy.jobs.runners.drmaa import DRMAAJobRunner
from galaxy.util import (
commands,
unicodify,
)
from galaxy.util.custom_logging import get_logger
if TYPE_CHECKING:
f... |
b8abfb852b83c2395dd72cdb4f47e9a15b6549de823c7338bcd5a96df6b34388 | Python | 11,111 | 349 | # --- 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 Outsidetextfont(_BaseTraceHierarchyType):
_parent_path_str = "funnel"
_pa... |
07e861c956356922c79b50366705c823c77e79b997c161ec55b3a03acf789f07 | Python | 11,112 | 247 | import argparse, time, logging, os, math, sys
import numpy as np
import mxnet as mx
from mxnet import gluon, nd
from mxnet import autograd as ag
from mxnet.gluon import nn
from mxnet.gluon.data.vision import transforms
from mxnet.contrib.quantization import *
import gluoncv as gcv
gcv.utils.check_version('0.6.0')
fro... |
75ec741840a27d100f5afe5115f061386a159741a17442950a5c32732a9355d0 | Python | 11,112 | 303 | import os
import re
import copy
from collections import OrderedDict as odict
import pytest
import pysam
import pysam.samtools
from TestUtils import make_data_files, BAM_DATADIR
def setUpModule():
make_data_files(BAM_DATADIR)
class TestHeaderConstruction:
"""testing header construction."""
header_dict ... |
de7507d44a7cf112bd2ef51178cf799f691d24671648e76a80ad2a4663ad5563 | Python | 11,114 | 349 | # --- 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 Insidetextfont(_BaseTraceHierarchyType):
_parent_path_str = "treemap"
_pa... |
ac7382657458ceb1380beaad4cec9cb7c883e869bea0e84cac277d4367845768 | Python | 11,115 | 278 | """Three-way collapse pricing parity gate (lane C05; collapse memo D1).
The phantom-k class: the optimizer scored a node count that is not what
gets drawn (a selected box priced k=1 while rendering one box PER CALL plus
kept atomic ops; synthetic child graphs claiming zero parent-owned ops).
The gate pins the parity c... |
bb26f9125363b6ccffebd02d96a9989d3de5e5d07a5dd4579fe3842f4df2c361 | Python | 11,115 | 299 | from typing import Dict, List, Optional, Tuple, Union
from PIL.Image import Image
from torch import Tensor
from lightly.transforms.gaussian_blur import GaussianBlur
from lightly.transforms.multi_view_transform import MultiViewTransform
from lightly.transforms.rotation import random_rotation_transform
from lightly.tra... |
a9c99c7252c0ee9590d02c7659c5da563d418a90bffdedaafbf514e400eedbe1 | Python | 11,117 | 349 | # --- 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 Insidetextfont(_BaseTraceHierarchyType):
_parent_path_str = "waterfall"
_... |
0ce946763fcf1fe330a3bbd6b056e0ef07505c8838240bd3617762e5e08f123d | Python | 11,119 | 349 | # --- 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 Insidetextfont(_BaseTraceHierarchyType):
_parent_path_str = "sunburst"
_p... |
1bf64ebe9591041d3220480489a628738ecc4da22b0e19c6eac76d8e7fbe9ee7 | Python | 11,120 | 347 | #!/usr/bin/env python3
"""
Various alignment utilities
"""
import logging
import sys
from math import inf
from .utils import run_cmd
# pylint: disable=C0103
# Invalid constant name
logger = logging.getLogger('pipe.blast')
class BlastHit:
"""Blast Hit.
Attributes
----------
qlen: int
query... |
4950fd0347b370edfae40a660aeeb6c6ed3ef4419a6862ddfe1dcaf40d96afc6 | Python | 11,122 | 323 | from unittest import mock
from uuid import UUID
import pytest
from api.mocks import FakeAuthContext, FakeUserWithAuthDependency
from fastapi import FastAPI
from fastapi.testclient import TestClient
from fastapi_pagination import add_pagination
from starlette import status
from carbonserver.api.infra.repositories.repo... |
5fb6a61b5c11281d9b3cd95942ba049444bb6100087f45c3a8e73d57cd2789df | Python | 11,122 | 349 | # --- 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 Font(_BaseTraceHierarchyType):
_parent_path_str = "histogram2dcontour.hoverla... |
3005d832cdbc11e0c26ca6c795e4e9886b6c26c7edf822b196c77313ebf32e12 | Python | 11,123 | 239 | import glob
import pandas as pd
import numpy as np
import nibabel as nib
from nilearn.glm.first_level import make_first_level_design_matrix
from nilearn.glm.first_level import FirstLevelModel
from nilearn.plotting import plot_design_matrix
from nilearn import image
import sys
def regressors(confound_df, num_compcor=8... |
49c9e5dc80b93321d3dd6a35bd2c95acee5755d109e11147bd8ebf3413af91c3 | Python | 11,125 | 353 | """
Mock database utilities for testing.
This module provides mock implementations of database connections and
operations for use in tests.
"""
import datetime
import json
import os
import sqlite3
import tempfile
from typing import Any, Optional
from unittest.mock import MagicMock, Mock
class MockDatabase:
"""M... |
3e8fa2554c68d880d8237757177a0342a1b180078fa4906e2fa806101108ed49 | Python | 11,126 | 349 | # --- 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 Outsidetextfont(_BaseTraceHierarchyType):
_parent_path_str = "waterfall"
... |
0c17544dc522a9a3b6cd41bd2e9b71d9b4a639e2594428c95108381d12b61a4b | Python | 11,127 | 265 | import slicer, qt, vtk
from slicer import qMRMLNodeComboBox
import numpy as np
class ROISelectionWidget(qt.QWidget):
def __init__(self, scriptedEffect, baseROIName: str, parent=None):
super(ROISelectionWidget, self).__init__(parent)
self.scriptedEffect = scriptedEffect
self.enforceRoiLimi... |
e3dec3811ec0c13cc7b1966bad95e33385623e76133e55f347d03681bd63b759 | Python | 11,127 | 239 | import glob
import pandas as pd
import numpy as np
import nibabel as nib
from nilearn.glm.first_level import make_first_level_design_matrix
from nilearn.glm.first_level import FirstLevelModel
from nilearn.plotting import plot_design_matrix
from nilearn import image
import sys
def regressors(confound_df, num_compcor=8... |
8618fbcd314bac77830a68e3143207008245c844d0a754d6c84055d739c27eec | Python | 11,129 | 279 | """
Test MODL trained with PSNR and SSIM loss with different acceleration factors
"""
#%% Import libraries
import os
import os,time, sys
from config import *
import wandb
os.chdir('../DeepOPT-2/')
sys.path.append('Utilities/')
sys.path.append('OPTmodl/')
sys.path.append('Reconstruction/')
sys.path.append(where_am_i(... |
a3aa8a33f20c72d7b75ea235894fbac6962064e0dbfd58cd8128eeb345f4c1df | Python | 11,129 | 349 | # --- 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 Insidetextfont(_BaseTraceHierarchyType):
_parent_path_str = "funnelarea"
... |
bb26937a22e17084869e65702007a522f4c85677d364ef475567b1d6777af90d | Python | 11,132 | 392 | from lxml import etree
from copy import deepcopy
import codecs
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
SVG_NAMESPACE = "http://www.w3.org/2000/svg"
XLINK_NAMESPACE = "http://www.w3.org/1999/xlink"
SVG = "{%s}" % SVG_NAMESPACE
XLINK = "{%s}" % XLINK_NAMESPACE
NSMAP = {Non... |
119d534714d36f127be17fbaee3af07ba127278a54de44313dadcd3eccdcd344 | Python | 11,133 | 294 | import numpy as np
from scipy.special import gamma as spgamma
from scipy.special import digamma as spdigamma
from scipy.special import polygamma as sppolygamma
from scipy.special import bernoulli as spbernoulli
from scipy.optimize import root as sproot
from scipy.optimize import root_scalar as sproot_scalar
from wormbr... |
53a1f6bf5368f4397f18b9e0745d3401793a1484caeb3e92987c7fb38542f73b | Python | 11,133 | 266 | import os
import pandas as pd
import numpy as np
import sys
sys.path.insert(0, '/mnt/homes/home024/abraun/pymeg')
sys.path.insert(0, "/Users/anke/cluster_home/anaconda/envs/py36/bin/mne")
import pymeg
from pymeg.contrast_tfr_baseline_per_session import Cache, compute_contrast, augment_data
from pymeg import contrast_tf... |
defaf0b8ce09d410fa4bcf3769afb9a73924d6eb7022d6fbc0396d0ee0688c0b | Python | 11,133 | 293 | from typing import Callable, List, Tuple, Union
import numpy as np
from numpy.typing import NDArray
from ..preprocess._preprocess import dinuc_shuffle_seqs
import seqpro as sp
def zero_ref_inputs(
inputs: NDArray
) -> NDArray:
"""Return a NumPy array of zeros with the same shape as the inputs.
Inputs are... |
9c0b702f9fa5e7b7bf56fea321a0f26f5bc4d1fe4b0d1ea81768e121d796d162 | Python | 11,134 | 325 | """Tests for additive API renames and grouped-option migrations."""
from __future__ import annotations
import warnings
from pathlib import Path
from typing import Any
import pytest
import torch
from torch import nn
import torchlens as tl
from torchlens import user_funcs
from torchlens.options import CaptureOptions,... |
170fb904ffd4415ab9fa4313ff3ab1cc54f1a2a53d1217a91d8d9c46dd84fa87 | Python | 11,136 | 283 | import dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_table as dt
import fire
import pandas as pd
from dash.dependencies import Input, Output
from codecarbon.core.config import get_hierarchical_config
from codecarbon.viz.components import Components
from codecarbon.viz.data... |
b5afab5f9b3ffef51672a5f551bb3f7839876b774f6b1bbc1def6839e16e2a70 | Python | 11,137 | 279 | """
Test MODL trained with PSNR and SSIM loss with different acceleration factors
"""
# %% Import libraries
import os
import os,time, sys
from config import *
import wandb
os.chdir('../DeepOPT-2/')
sys.path.append('Utilities/')
sys.path.append('OPTmodl/')
sys.path.append('Reconstruction/')
sys.path.append(where_am_i... |
224821ddf184905fe91dd8d0f87d8cd70e136fe97773b9deeba27a44e822b29a | Python | 11,138 | 303 | """Duplicate/empty mutable-container cell pooling (the M14 memory slice).
Covers the ``PooledCell`` contract end to end on a real capture: pooled
cells exist on the finished trace (the memory win is real), reads hydrate
fresh exact-type containers with stable identity and per-row isolation,
forks and pickles never obs... |
425cd8103f936a841048c0c7e7f444a4929b918836135655cfe1154b17d4f825 | Python | 11,143 | 339 | import torch
from torch.utils.data import ConcatDataset
import pandas as pd
import numpy as np
import pickle
import os
from Bio import pairwise2
from math import isnan
from tqdm import tqdm
from dataclasses import dataclass
from typing import Optional
from protein_mpnn_utils import alt_parse_PDB, parse_PDB
from cache ... |
396c8207848ba8fb97387d86235388ef6bb2ba4777d040549769800eeeeb583a | Python | 11,145 | 312 | # 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 software except in compl... |
cd883826f518168396aa64f7298ce2c68156935b7c768d6a5f52606a0825c8ac | Python | 11,146 | 302 | from typing import Any
import pandas as pd
import numpy as np
import copy
from mirp._images.generic_image import GenericImage
from mirp._imagefilters.generic import GenericFilter
from mirp._imagefilters.utilities import SeparableFilterSet, pool_voxel_grids
from mirp._images.transformed_image import TransformedImage
f... |
be5f6a96f04544187ab454cbed763ef86e255781c51fb56e59f70a4a48578d5f | Python | 11,147 | 288 | """Gate-witness manifest + except-skip scanner + EXECUTES-NOWHERE ratchet
(testing memo D4, build items C1-C3; F36 waves B-E).
Extends the three standing skip-audit layers (tests/test_skip_audit.py)
with the wave B-E obligations:
- every NAMED gate (``GATE-ID:`` declaration or venue-skip conftest) has a
manifest ro... |
7e9fc917cf35aa1578ce3a2212bb61815d5fbb9b29d2d4aebf60a0321606fb8b | Python | 11,148 | 250 | #!/usr/bin/env python3
"""
Dx AA — verification of the rank-norm tool.
Configuration:
- Pool: ds004504 + brainlat + ds006036 + ds003775 + LEMON ≥60
+ figshare 5450293 (6 cohorts, 4 AD-containing, n = 498)
- Features: 15 (5D + IAF + DFA + FOOOF exp/off + IAF gradient
+ α/θ frontal asymmetry + iPLV alpha glo... |
3972380bdfa0a4f78a34565e7b5c908f5c53547dc00209922b223d4f6fa44d21 | Python | 11,149 | 378 | # 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... |
2a115038a1aa70d978a369d14893670ad2ee2fb08eea591954760f97e61e0371 | Python | 11,150 | 354 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# rpy2 documentation build configuration file, created by
# sphinx-quickstart on Sat Feb 8 18:51:08 2014.
#
# 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
# autog... |
35ff1ca46b0c715e8cc147cc57d4628a039f811fbe0e796bc2bef7a625a71a90 | Python | 11,150 | 235 | '''
Wrapper code that uses Paula's 'fmripop' code to perform basic denoising.
For this project denoising is very minimal because FIX has already been run.
see https://github.com/brain-modelling-group/fmripop/blob/master/post_fmriprep.py
'''
# %%
import sys
import time
import os
import json
import numpy as np
from nil... |
ac9c070a1e18677871abbe0a18801c309eb8bc2bd46d20c8c4442e62ebe2c8d6 | Python | 11,150 | 201 | """
Functions to interpolate metrics (from sct_process_segmentation) into the PAM50 anatomical dimensions
Copyright (c) 2023 Polytechnique Montreal <www.neuro.polymtl.ca>
License: see the file LICENSE
"""
import numpy as np
from spinalcordtoolbox.image import Image
from spinalcordtoolbox.aggregate_slicewise import Me... |
81555869c075e48d191d960903467d547fdda20cb04e19e0f804caa95904cb30 | Python | 11,152 | 297 | #!/usr/bin/env python3
"""
File: plot_start_nieqtls_vs_end_nieqtls.py
Created: 2021/05/18
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 s... |
736e8ead8cb3dd7c54c4f69fd53f4a985b3f94b8a44e446c5a5b516f79f10e91 | Python | 11,154 | 271 | import tensorflow as tf
from . import agc
from tensorflow_addons.utils import types
from typeguard import typechecked
# https://stackoverflow.com/a/66524901
# https://keras.io/guides/customizing_what_happens_in_fit/
@tf.keras.utils.register_keras_serializable() # adding this avoids needing to use custom_objects when... |
30e76586c03e5bbacb64b77a6002f00e1bae604da7c008a66ae8d747ee40caa7 | Python | 11,157 | 287 | from libmushu.driver.bptools.bptools import Receiver
from libmushu.driver.bptools.container import DataContainer
import multiprocessing
import asyncio
import time
# f1 --> grab stuff from the receiver queue, put it into the container.
# the container class functions as the buffer. it's basically a numpy array.
async... |
bf67e563095e7a17f4387e7bf36d25c712ada2900831fa7798db410b94c2943f | Python | 11,171 | 234 | # 均匀采样效果较差
import json
import numpy as np
import os, sys
from collections import Counter
from sklearn import preprocessing
from sklearn.metrics import f1_score
from sklearn.metrics import confusion_matrix
import torch
import torch.nn as nn
import torch.nn.utils.rnn as rnn_utils
import torch.nn.functional as F
from torc... |
2b541cf9f69afc2465ad349dca2bc190586816b92e418324e27f1b5d3bef4c9f | Python | 11,172 | 273 | """DeepLabV3+ with wideresnet backbone for semantic segmentation"""
# pylint: disable=missing-docstring,arguments-differ,unused-argument
from mxnet.gluon import nn
from mxnet.context import cpu
from mxnet.gluon.nn import HybridBlock
from .wideresnet import wider_resnet38_a2
__all__ = ['DeepLabWV3Plus', 'get_deeplabv3b... |
23725653e51978958b0fa33ad6c3df9a8670609aa2a1b32cf3c09cbff03615bd | Python | 11,174 | 245 | import argparse, os, math, time, sys
import mxnet as mx
import logging
from mxnet import gluon, nd, image
from mxnet.gluon.nn import Block, HybridBlock
from mxnet.gluon.data.vision import transforms
from mxnet.contrib.quantization import *
import gluoncv as gcv
gcv.utils.check_version('0.6.0')
from gluoncv.data impor... |
614173b5efb7f4eb4f1888405a1001dddce45e8363ee35f05de6be87fd7013da | Python | 11,175 | 335 | """Value validators for the grouped option dataclasses in ``options.py``.
Split out of ``torchlens/options.py`` (2026-08-26 P03 fix cycle) along the
validation seam: every function here checks or normalizes ONE resolved option
value and raises a typed, teaching refusal on violation. The construction
plumbing (explicit... |
f567317001c8928eb9ad6f5b34ef814185e7be868a57f21157bbc49bf9a1fcad | Python | 11,177 | 329 | import random
import numpy as np
import matplotlib.pyplot as plt
import torch
import torchvision
from tqdm.auto import tqdm
def read_batch(batch, return_x_only=False):
"""
This function expects a batch to be in one of the two forms:
- a dictionary {'x': ..., 'y': ..., ...}
- a tuple (x, y)
... |
d5193dee2b06305821793fb40c458880a833cf0c21f4c000580330d21df32fd0 | Python | 11,181 | 275 | #!/usr/bin/env python3
"""
Dx AZ — Drop-FOOOF hypothesis test
====================================
The Dx AY §3.9 feature ablation found that under proper per-fold CV
on held-out figshare, dropping FOOOF features (fooof_off + fooof_exp)
*improves* AUC by +0.01. This contradicts v0.76's framing that FOOOF
features were... |
a9bf0ae283946847003972dd7f56b68b5bc8de1e64ffd0f7ddb8e6649dd14ec5 | Python | 11,187 | 303 | #!/usr/bin/env python
# =============================================================================
# MODULE DOCSTRING
# =============================================================================
"""
Test shared functionalities of the TFEP maps in the ``tfep.app`` package.
"""
# ==============================... |
6782c65d0ce974783884836483fa715e89fa714546f83091a3660e42dbb627e6 | Python | 11,192 | 382 | import argparse
from pathlib import Path
import torch
import logging
import numpy as np
import pandas as pd
from ase import data as ase_data
from ase import units as ase_units
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
import warnings
warnings.simplefilter(action="ignore", category=Futu... |
3e64871eb7cd71b2b8fab3effdca4db08ef0bf42c8c26281b35964608961981b | Python | 11,193 | 305 | """F16 B4: the treescope bridge -- registration, probe, sniff, ledger.
Test-discipline law (treescope memo s12), each rule earned by a measured
trap:
1. bridge renders are UNCOMPRESSED (compression hides the duplicate-box
marker from grep);
2. ``ignore_exceptions=False`` plus a POSITIVE our-handler marker (a dead
... |
5493f93fd23820e72f9432ff8e11d54bc250d11c458882ca9d54a98247282edd | Python | 11,200 | 332 | """
Helpers backing the dataset manager app.
Resolves a dataset's processing status and runs the preprocessing, processing
and annotation steps, keeping that logic out of the UI layer.
"""
from __future__ import annotations
import shutil
from dataclasses import dataclass
from pathlib import Path
from typing import A... |
ddad91aad6eab500d7ac2ad0b4f7b56bfd162c16e75f08dcb99cba41e251db12 | Python | 11,202 | 270 | """
11: Further Analysis
====================
Analyze results from fitting power spectrum models.
"""
###################################################################################################
# Exploring Power Spectrum Model Results
# --------------------------------------
#
# So far we have explored how to... |
11e7b55dbf25724126a053a1deb84613ac291d346135c437d1edc1dc59fdc42f | Python | 11,205 | 275 | import numpy as np
import torch
from torch.nn import functional as F
from scipy.ndimage.filters import gaussian_filter
from ovseg.utils.torch_np_utils import check_type, maybe_add_channel_dim
class SlidingWindowPrediction(object):
def __init__(self, network, patch_size, batch_size=1, overlap=0.5, fp32=False,
... |
156911b45397b4b986eb6229811fe8c586801847f2cc3eecf71cc8d0abf1d0e1 | Python | 11,207 | 289 | from libmushu.driver.bptools.bptools import Receiver
from libmushu.driver.bptools.container import DataContainer
import multiprocessing
import asyncio
import time
# import logging
# log=logging.getLogger('logit')
# f1 --> grab stuff from the receiver queue, put it into the container.
# the container class functions ... |
7c90efd31c283f77ca65d718ef154f966baab3bc8d96de7215d4da433d40844b | Python | 11,208 | 279 | """The generalized vocabulary lint: Rule V3 + closure census (F35; memo item 6).
C01 landed the ratified V2 relocations with per-move V3 spot checks
(tests/test_arch_spine_relocations.py). This suite is the GENERAL lint the
memo's VOCABULARY CLOSURE row demands, over every module that declares
``__tl_vocabulary__ = Tr... |
dc6c7616642d441b8988d0751660d0f5219d3235039d5ace185b16b8e45e2e07 | Python | 11,208 | 300 | # 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... |
d54f4c70703b3a9fd22a1f1ae22a24aaf53badb24933b218ee34e9ecd1b9fedd | Python | 11,209 | 234 | # 均匀采样效果较差
import json
import numpy as np
import os, sys
from collections import Counter
from sklearn import preprocessing
from sklearn.metrics import f1_score
from sklearn.metrics import confusion_matrix
import torch
import torch.nn as nn
import torch.nn.utils.rnn as rnn_utils
import torch.nn.functional as F
from torc... |
b0ec7d98d074fd2b66f2ba7a9ef9ab5ca9e7ab69818ba83b5ae8540b11b5b1ca | Python | 11,210 | 218 | from pathlib import Path
from typing import Union
from typing import List
import multiprocessing as mp
import numpy as np
from tqdm.auto import tqdm
import decord
from .util import FR_Module
from .helpers import VideoReaderWrapper, BufferedVideoReader
## Define Dataset class as a subclass of utils.FR_Module
class Da... |
8da4f50fb32bc9de3e562df2985e5d06182e13ff7326d35f48901498d82c670f | Python | 11,215 | 298 | # ------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# ------------------------------------------------------------------------------
import cv2
import math
import matplotlib
import numpy as np
imp... |
ed193aace1afe06b1dae44d9ec9daa17eab5927ffa6f06bc1e53a53957a98561 | Python | 11,215 | 301 | # Author: Christian Brodbeck <christianbrodbeck@nyu.edu>
import numpy as np
from numpy.testing import assert_array_equal, assert_allclose
import pytest
from scipy import signal
from eelbrain import NDVar, Case, Scalar, UTS, datasets, concatenate, convolve, correlation_coefficient, cross_correlation, cwt_morlet, find_i... |
0570feadd8015c1318219593f84612864c47d3c67b26edc145985fa43219d6cc | Python | 11,217 | 321 | import grain
import numpy as np
import pytest
from absl.testing import parameterized
from tensorflow import data as tf_data
from keras.src import Sequential
from keras.src import backend
from keras.src import layers
from keras.src import testing
from keras.src.testing.test_utils import named_product
class ResizingTe... |
658d3948100d3167748b8dab064db05ac9390dffa02abe983b73314092270ca3 | Python | 11,217 | 391 | from __future__ import annotations
import functools
from collections.abc import Callable
from pathlib import Path
from typing import TYPE_CHECKING
from typing import Final
from unittest.mock import MagicMock
import numpy as np
import osam.types
import pytest
from pytestqt.qtbot import QtBot
from labelme._automation ... |
ba4f41ce9365d88f1b5e944faed250bb09f2cc151e4c2cad7c883ccd0bd382fb | Python | 11,217 | 258 | import os
import torch
from collections import OrderedDict
from abc import ABC, abstractmethod
from . import networks
class BaseModel(ABC):
"""This class is an abstract base class (ABC) for models.
To create a subclass, you need to implement the following five functions:
-- <__init__>: ... |
04d700b48f3d5e3139ebe1e162df30bf9a223213c82c50b4f77b3692b111c011 | Python | 11,218 | 377 | import io
import os
import pytest
import werkzeug.exceptions
import flask
from flask.helpers import get_debug_flag
class FakePath:
"""Fake object to represent a ``PathLike object``.
This represents a ``pathlib.Path`` object in python 3.
See: https://www.python.org/dev/peps/pep-0519/
"""
def __... |
4fa86e404bcf3bed9006976f838251e93a7fa6c17a6f2b31c85ea94acf8ec8cc | Python | 11,223 | 299 | import os
import shutil
import glob
import random
import numpy as np
import filecmp
import re
from copy import deepcopy, copy
from datasets import Lang, flip, make_hashable, bundle_biml_episode, input_symbols_list_default, output_symbols_list_default, equiv_to_miniscan
from train_lib import seed_all
from interpret_gram... |
4dd7eb8c8618a0e8be11995ea055da02e92005789c7ffc0aefdbaff24963b0f7 | Python | 11,224 | 326 | """
The brain, coupling sensory input to locomotory output.
Assembles the configured sensor, memory and locomotor modules into one
controller, and steps them in order each timestep so that the sensed
environment drives the agent's motion.
"""
from __future__ import annotations
import numpy as np
from ... import uti... |
c24e2d2201bfe0a92faf1e4066b705be713be3850117ae91623d7c7b8beb520d | Python | 11,227 | 268 | from typing import Optional, Tuple, Union
import numpy as np
import pyvista as pv
from pyvista import PolyData, UnstructuredGrid
try:
from typing import Literal
except ImportError:
from typing_extensions import Literal
from ..utilities import add_model_labels, merge_models, scale_model
from .mesh_utils impor... |
8f71ab5472dc1e1f92899282e640687b2fe2c07c9189b7ed82fe4a84c6397a0c | Python | 11,231 | 304 | """Observe-kit items 5, 6, 10: backward NaN bisector, shared shape, AMP disclosure.
Healing is measured fact: a sqrt-backward birth erased by a downstream
relu-backward means a finite loss gradient does NOT prove a clean backward,
so the bisector carries the full fire-order ledger with the earliest provable
birth head... |
db1cd55bb958c0f52e1023b9902bbdbfa11635b627cb26e7d6c8865097da25ab | Python | 11,237 | 283 | """FIXD03-F13 regression gates: D03-R4 fan-in labels + D03-R5 oracle scope.
D03-R4 (head-label pileup): argument labels on children with visible fan-in
>= ``_ARG_LABEL_MIDPOINT_FANIN`` relocate from ``headlabel`` (painted
post-layout at one shared radius -- the densenet smear) to a midpoint
``label`` (reserved layout ... |
22ff5251eba2f539e3a0c0449e4f0de3f46f8b59bda6f538ba937c541904f682 | Python | 11,239 | 394 | # 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... |
590548a0a9fbf3142a9c02877f6d4146597983ff2e09867a3d85f019aad8f623 | Python | 11,239 | 293 | import unittest
import torch
from typing import Sequence, List, Tuple, Dict
from .mol_featurizer import MolFeaturizer
from rdkit import Chem
from rdkit.Chem import Mol
from rdkit.Chem.rdDistGeom import EmbedMultipleConfs
from rdkit.Chem.rdMolAlign import GetBestRMS
from rdkit.Chem import AllChem #needed for rdForceFie... |
fec728a191cbd8f079f633433732f68ac0fcaadbb341e8b170e68703e79b4985 | Python | 11,239 | 290 | # 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 software except in compl... |
ef1d7c7279173a7596a3844878f2661fb6e72443bbfc2645c9b97e6081c395f1 | Python | 11,240 | 239 | """
This module define WeightModifier
"""
import logging
import torch
import geoopt
from utils.utils import function_not_implemented
from losses.lm_cross_entropy import LMCrossEntropy
from losses.cross_entropy_per_prot_weighted import CrossEntropyPerProtWeighted
from losses.mse_structure import MSEStructure
from losses... |
4ae8d55ffe510369c0507ef84e6415ae7d0514e1a3f1e24528efd119a7588860 | Python | 11,242 | 393 | """
Comparative benchmark: CuTe DSL vs Native PyTorch block sparsity computation.
"""
import torch
from dataclasses import dataclass
from typing import Callable, Optional, List
from tabulate import tabulate
from tqdm import tqdm
import itertools
from cutlass.cute.runtime import from_dlpack
from cutlass.cute.testing i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.