sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
21b1ab533465d4e3245897d658d7554cb34435b30699749dcd7d242e8154eb4a
Python
44,813
1,068
import os import cv2 import imgui import numpy as np import threading import pyperclip from typing import Optional, Tuple, Union from .roi import ROIWidget from .._renderer import CapturedException from ..utils import EasyDict, LEFT_MOUSE_BUTTON, RIGHT_MOUSE_BUTTON from ..gui import imgui_utils, gl_utils import slide...
7c8d8142099b21da47492483997d78a03992eddb12ce2aa46a6e9cd64bc08ade
Python
45,015
1,164
# Copyright 2026 The HuggingFace Team. 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 applicabl...
e5c9d9ab8a93e26b8c62bbb121073607cc54cf9e69a1ca66bbf58dd0d082e956
Python
45,139
975
from matplotlib import pyplot as plt import matplotlib as mpl from matplotlib.gridspec import GridSpec import numpy as np import os import pandas as pd from scipy import stats as sp from pathlib import Path from connectivity import visualize as vis from connectivity import nib_utils as nio import connectivity.consta...
5e570031034c79994271a35f2821cd55c161bc59ced2b4ee09c082959006b246
Python
45,234
1,237
""" RDA Frequency Labeler: Label frequency for unlabeled LRDA/GRDA segments. Targets segments with >=50% IIIC agreement that lack frequency labels. Uses W05_DomOnly_IterRefine (Hilbert + iterative narrowband) for default frequency estimate. Also runs Tautan et al. for comparison. UI: EEG with narrowband overlay at se...
a7f31a4f4ce928fb0bce7c92dd674fb18d05fd1acda39cbb21680d472145fda1
Python
45,261
1,143
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union import os import pickle import numpy as np import pandas as pd import slideflow as sf import warnings from os.path import join, exists, isdir from pandas.core.frame import DataFrame from sklearn.cluster import KMeans from slideflow import errors...
63173ee1a44b2ebc82123e560e25deaa706f2ba3fab1f963e8a052f112c20af8
Python
45,328
1,113
# Copyright 2020 The Facebook AI Research Team Authors and The HuggingFace Inc. team. # # 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 # # Un...
411e5c400731211c7558b129352e19bf8441aef4c469fc14cd6e7eee9b98db04
Python
45,412
1,231
"""Functions for extracting subgraphs. The module only contains functions for extracting subgraphs deterministically. For stochastic subgraph extraction, please see functions under :mod:`dgl.sampling`. """ from collections.abc import Mapping from . import backend as F, graph_index, heterograph_index, utils from ._ffi...
d376ea7f253bc0464e2573a7ceb268d20ceaddec6dff25dc7962096654864e22
Python
45,484
1,393
"""Torch modules for graph global pooling.""" # pylint: disable= no-member, arguments-differ, invalid-name, W0235 import numpy as np import torch as th import torch.nn as nn from ...backend import pytorch as F from ...base import dgl_warning from ...readout import ( broadcast_nodes, max_nodes, mean_nodes, ...
8ad01442a04272196f9859705e0e1e6ccd0f331a5f30fca7621aaa7242f34613
Python
45,535
1,386
"""A set of graph services of getting subgraphs from DistGraph""" import os from collections import namedtuple import numpy as np import torch from .. import backend as F, graphbolt as gb from ..base import EID, ETYPE, NID from ..convert import graph, heterograph from ..sampling import ( sample_etype_neighbors ...
d7d4a816b0256df55ef780dd6cfd8bfdd683ade386e86ea3cb68e463eec0015e
Python
45,588
1,292
"""Provide concrete implementation for feature storage via HDF5.""" # Authors: Synchon Mandal <s.mandal@fz-juelich.de> # Federico Raimondo <f.raimondo@fz-juelich.de> # License: AGPL import io from collections import defaultdict from collections.abc import Sequence from pathlib import Path from typing import ...
3a12ea1a9566c318441b8659cdd2b57945d82ea0581324757a74b776b0129a95
Python
45,676
1,177
""" Tool Name: cxr_ett_tip_to_carina_report ======================================== Write final review artifacts for the CXR ETT tip-to-carina workflow. Produces one overlay PNG and one JSON per sample, plus a small dataset-level CSV and HTML page rebuilt from the available per-sample JSON files. """ from __future__...
8dfa9d80d969e4df814bdf1efd19e4b9fbff2f5bf97ee1632edfe6fd09dc915d
Python
45,732
1,103
# Copyright 2021 The Marian Team Authors and The HuggingFace Inc. team. 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...
fecb57047226597456e8badd6013dab622cdd3996a70cd442ea7eefe2b6aced4
Python
45,743
1,020
# Copyright 2022 Meta Platforms, Inc. and The HuggingFace Inc. team. 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 # ...
1f7c4e0090e9b23cfd9f39b844858f45d338bcb12f6c93fb4ce79e3cb59b6b55
Python
45,744
1,121
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/clipseg/modular_clipseg.py. # Do NOT edit this file manually as any edits will be overwritten by the generation o...
634424649d28bb1df4a80af7f985eccb3f24bc83d48b969972b58514f83a50ea
Python
45,746
1,013
# Copyright 2025 Baidu Inc and The HuggingFace Inc. team. # # 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 ...
888f9b604d89d55f78af92e9afa3e8ff43c661ae72046fe08ebc992edb8af6a2
Python
45,763
1,276
""" prepare_fmap_intendedfor.py --------------------------- For each sub/ses, populate the ``IntendedFor`` field in all fmap JSON sidecars. How it works ------------ 1. Read AcquisitionTime from every func JSON sidecar (bold + sbref). 2. Read AcquisitionTime from every fmap JSON sidecar (AP and PA epi). 3. Sort fmaps ...
10ef83437e0b211200d99e6a05d882db6a78952277ba699e37a4c46a66634a62
Python
45,815
1,314
# ----------------------------------------------------------------------------- # Copyright (c) Yongning Lei 2024-2025 # All rights reserved. # # This script is distributed under the Apache-2.0 license. # You may use, distribute, and modify this code under the terms of the Apache-2.0 license. # See the LICENSE file for...
e11e39607b878fb3ba8bccde6126c188c449a407c700d5489cddf88fe3d47ee4
Python
45,980
1,189
"""Tools for evaluation MIL models.""" import os import inspect import pandas as pd import slideflow as sf import numpy as np from rich.progress import Progress, track from os.path import join, exists, dirname from typing import Union, List, Optional, Callable, Tuple, Any, TYPE_CHECKING from slideflow import Dataset,...
72eee708425655cf8007ca1cfe308a9f55aae05333e6040db045c61c7f26b407
Python
46,057
1,018
# Copyright 2026 Google Inc. HuggingFace Inc. team. 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 requir...
e8157283bfccd7cb82160d318937f026083666df47fc2510cff9f2a4dbad32a4
Python
46,172
944
# Copyright 2021 The HuggingFace Inc. team. # # 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 ...
c9a982e59d582ee039abe3cf0b591164282d19febeef8c663ced0b0fcde541f3
Python
46,187
1,158
# Copyright 2020 Microsoft and the Hugging Face Inc. team. # # 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...
68a6a052fe2e79309d0c03f0cdac12d6147ede8cac91a0386659c9156b2a6bce
Python
46,213
951
import time import os from os.path import dirname, abspath import sys import shutil import warnings import numpy as np from collections import namedtuple import json import h5py from tqdm import tqdm import torch from torch import optim from torch.utils.data import SubsetRandomSampler, DataLoader from torch.utils.tens...
49a1d54cb6427bd9e4027de4fe1f3e906545339b84bc78a32fe6fa3454e92594
Python
46,232
1,202
# Copyright 2024 HuggingFace Inc. team. 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 applic...
87434c5b365d3a34db274992afa46c535a55c778bdf1c51f9f401448bcf0db66
Python
46,245
1,333
# ----------------------------------------------------------------------------- # Copyright (c) Yongning Lei 2024-2025 # All rights reserved. # # This script is distributed under the Apache-2.0 license. # You may use, distribute, and modify this code under the terms of the Apache-2.0 license. # See the LICENSE file for...
9f46a6a11be21f6c66005b9897bc986ac9fcd5b335651287789f8dea7cf255ef
Python
46,399
1,338
# ----------------------------------------------------------------------------- # Copyright (c) Yongning Lei 2024-2025 # All rights reserved. # # This script is distributed under the Apache-2.0 license. # You may use, distribute, and modify this code under the terms of the Apache-2.0 license. # See the LICENSE file for...
bf4eaab3a17515b7ee9087a725dec2d0f3185448b1053b9f0fd2ddb2a16edaf6
Python
46,450
1,236
# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates # SPDX-License-Identifier: Apache-2.0 # mypy: disable-error-code="attr-defined" """Source construction and distillation for the molecular LIT workflow.""" from __future__ import annotations import logging from dataclasses import replace import jax import num...
f12d0e90c194b166b6d82e9fb36ac099c2f7c1d5d6ae10299116924ff28b4dcb
Python
46,563
1,085
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/bailing_hybrid/modular_bailing_hybrid.py. # Do NOT edit this file manually as any edits will be overwritten by th...
d5c70aec3646b86ed82354e7bfa674032ab16b71a59f2b95f42adbd0c84dd507
Python
46,586
844
# Copyright 2026 The HuggingFace Inc. team # # 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 t...
6940521448b4376c8bd00862bd39895193085600673642bff9e19f2637011c81
Python
46,604
1,025
# Copyright 2025 The HuggingFace Team. 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 applicabl...
43b2a208ed6bd36c48c10b20beed5c9f8058d9aec407d7906feae442e5d4f8bf
Python
46,902
1,319
# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates # SPDX-License-Identifier: Apache-2.0 # ruff: noqa: DOC201,DOC501 """Direct NQS Lorentz integral transform for molecular dipole response. This module follows the correction-vector formulation used in arXiv:2504.20195: a full neural response wavefunction ``Psi_...
d527490bb4aad958506cd63bd03096400503d242a66be49594abde8cf48b3283
Python
46,976
1,153
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/beit/modular_beit.py. # Do NOT edit this file manually as any edits will be overwritten by the generation of # ...
c09c6b42b1989ddcf40218ab17c5beddc7892a9d41cdca17b2f8cf9b99660429
Python
47,015
1,082
# Copyright 2024 Meta Inc. and The HuggingFace Inc. team. 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 re...
a560f205a74ac04e380cbda1cb3a6ff7e4ade3c723f5c6a102716a949783f815
Python
47,027
1,179
# Copyright 2021 The I-BERT Authors (Sehoon Kim, Amir Gholami, Zhewei Yao, # Michael Mahoney, Kurt Keutzer - UC Berkeley) and The HuggingFace Inc. team. # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except ...
ffcca6a8920b3d0d9836b1e10b94690945a96b7582d9a482ed44f939ea4c1434
Python
47,046
1,632
"""Provide tests for API functions.""" # Authors: Federico Raimondo <f.raimondo@fz-juelich.de> # Leonard Sasse <l.sasse@fz-juelich.de> # Synchon Mandal <s.mandal@fz-juelich.de> # License: AGPL import logging import sys import tempfile from contextlib import AbstractContextManager, nullcontext from c...
4ac9f90d24f60b7bb3d4b7796fdceec67037e890086d539385bf40df6acb1b6c
Python
47,123
1,122
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/hubert/modular_hubert.py. # Do NOT edit this file manually as any edits will be overwritten by the generation of ...
1b197549e11ab1642f2567cb122dc08d483641497592b0f0554f7b83e612dded
Python
47,280
2,102
"""This file defines the unified tensor framework interface required by DGL. The principles of this interface: * There should be as few interfaces as possible. * The interface is used by DGL system so it is more important to have clean definition rather than convenient usage. * Default arguments should be avoided. *...
a3185dce6e297ad23194d26f24effc92e7223a9a7a3ff991770879798967c3ef
Python
47,431
1,166
# Copyright 2022 Intel Labs, OpenMMLab and The HuggingFace Inc. team. 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 #...
286630321893f37b69446e71c2b07feba4d20d8b21ef33155871a9b083c2acf5
Python
47,482
1,125
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/aria/modular_aria.py. # Do NOT edit this file manually as any edits will be overwritten by the generation of # ...
cb7c386d5de19228284fc100fc3e205955a8362313057ff701cfc816eda5eb16
Python
47,562
792
# Copyright 2026 The HuggingFace Inc. team. # # 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 ...
09feff890e0c38cc6a468c05aadea56139bf7a500f6e36b83906039a96f2f19e
Python
47,645
1,325
from copy import deepcopy from heapq import heapify, heappop, heappush, nsmallest import dgl import numpy as np # We use lapjv implementation (https://github.com/src-d/lapjv) to solve assignment problem, because of its scalability # Also see https://github.com/berhane/LAP-solvers for benchmarking of LAP solvers from ...
b8edee2da6c4aced5f7e030958f43409783025a56a281308013fdf4f242b52a2
Python
47,748
1,170
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/metaclip_2/modular_metaclip_2.py. # Do NOT edit this file manually as any edits will be overwritten by the genera...
b6eab4c2170101f2b045affa855504ce504aa23a3fed6cfada5f174086673a02
Python
47,798
1,259
""" Phase 2: Retrain ChannelPD-Net with balanced LPD/GPD data and a heteroscedastic uncertainty head for frequency estimation. Key changes from V1/V3: - freq_head split into freq_head_mu + freq_head_logvar (uncertainty) - Heteroscedastic NLL loss instead of MSE for frequency - GPD frequency examples upweighted 3...
e1b3ce0b5ce2eedcdf5bf6b0417676b25b8673bb0e14eb25f50623e954008c8f
Python
47,861
1,477
"""DGL sparse matrix module.""" # pylint: disable= invalid-name from typing import Optional, Tuple import torch class SparseMatrix: r"""Class for sparse matrix.""" def __init__(self, c_sparse_matrix: torch.ScriptObject): self.c_sparse_matrix = c_sparse_matrix def __repr__(self): return ...
b17eff257f7bb060ffff47c7fdd560abc36b6845e444d75082efc51b917173b8
Python
47,974
1,183
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/data2vec/modular_data2vec_text.py. # Do NOT edit this file manually as any edits will be overwritten by the gener...
4e04c9b30978909ee31e06aeed2ebc94ad3d90f738b1f532ede07a1345f4d721
Python
48,047
1,607
"""Module for heterogeneous graph index class definition.""" from __future__ import absolute_import import itertools import sys import numpy as np import scipy from . import backend as F, utils from ._ffi.function import _init_api from ._ffi.object import ObjectBase, register_object from ._ffi.streams import to_dgl_...
4d504cd1ea42676f03e3720601e986084a3f8b8cc882db068f1732d413cd1a96
Python
48,581
1,231
"""Libvips slide-reading backend. Requires: libvips (https://libvips.github.io/libvips/) """ import re import cv2 import numpy as np import slideflow as sf import xml.etree.ElementTree as ET from types import SimpleNamespace from PIL import Image, UnidentifiedImageError from typing import (Any, Dict, List, Optional, ...
c549d2af26f30fc7bcda9d716b997b341cf895d318d3eb1c8b52886776788c09
Python
48,642
1,114
# Copyright 2024 the HuggingFace Inc. team. 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 appl...
068e5bc6886be9970ea96dfeb83d24133f8101d978e97d7bc9fb71d94a7b2d20
Python
48,656
1,117
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/gemma3/modular_gemma3.py. # Do NOT edit this file manually as any edits will be overwritten by the generation of ...
0c0a4930c817a9fd2434d10ea82206fc02310998fa5f34ada1a4466c9358e552
Python
48,704
1,005
# Copyright 2022 The HuggingFace Inc. team. # # 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 ...
e87ea019b47b70dc75a269e135d86657438c805f77c04256dc5aec36ca977210
Python
48,744
1,362
"""PipelineCreator class.""" # Authors: Federico Raimondo <f.raimondo@fz-juelich.de> # Sami Hamdan <s.hamdan@fz-juelich.de> # License: AGPL import typing from dataclasses import dataclass, field from typing import Any import sklearn from scipy import stats from sklearn.ensemble import AdaBoostClassifier, Ad...
93ba4270e4ea9be82a0e9b90c21ae1b0539d2c75c3c191ba86f595e745cd180e
Python
48,785
1,277
#!/usr/bin/env python3 """ Check Analysis Integrity (Generic Engine) ========================================== Validates completeness of neuroimaging analysis folders. All analysis-specific knowledge (file lists, folder structure, timing logic) lives in analysis_checker/. This file contains only: - AnalysisSpec AB...
f368ee43d646fa72a31130eaf0bf7f6484f9ba52ebdd0684cdb82dc5f2b49fdc
Python
48,791
1,128
# Copyright (c) Meta Platforms, Inc. and affiliates. # 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...
c18e5f3e447dfcafb089ae542f538d42fc30459b3f735b6d33d69c1ed4c8a61e
Python
48,993
1,119
# Copyright 2024 The HuggingFace Inc. team. 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 appl...
59e2cae203b822378e0b6c9efba98a3fe26c3f59e3c42ee58943316f54a674df
Python
49,104
1,158
# Copyright 2022 Microsoft Research and The HuggingFace Inc. team. # # 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 ap...
5642ab84815cbaae1794a2e615237b5ca6c26c109fbfbf314bfaec984ad07ada
Python
49,309
1,145
# Copyright 2024 The HuggingFace Inc. team. 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 appl...
6d2d50fc6db756211a1f6ff0119fcf7e9116ff80ba314562376ed06a7fc76837
Python
49,410
1,139
# Copyright 2022 The HuggingFace Inc. team. # # 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 ...
ae257dfde3fd36410d6af9dfc2661ac2837724bd33aa1774b8b5ba37c87cb47e
Python
49,485
1,176
# Copyright 2025 HuggingFace Inc. team. 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 applicab...
5b0e8c8be47436f43bd569ebbb5f1535ed62f12b0d5a02bcaae465107b9c420c
Python
49,799
1,111
"""V4 Unified Methods Round 2 — 25 methods targeting AUC>0.814 AND Freq ρ>0.667. All methods process hemispheres independently, outputting: left_score, right_score — for lateralization + classification extras.freq — frequency estimate from dominant hemisphere """ import numpy as np from scipy.signal import wel...
dedf404dbc353961aa6ff23aa6b068a623821f9f2a18bee46e00e96dba923234
Python
49,815
1,394
""" Runtime support: replay reuse ================================= Description: Helper functions used by run_plan.py to compare a current plan against prior blackboard run_start records and decide whether tool outputs can be reused. Arguments: - replay_plan_id: run to be replayed - re...
d68de1e50c186b5135aa67fec9ee2c3a9841e06beb62f41fd2a8c7cc5135f583
Python
49,943
1,439
import os import sys import logging import copy import math from abc import ABCMeta, abstractmethod import mne import numpy as np # from scipy.fftpack import rfft, rfftfreq from scipy.signal import welch, decimate from scipy.signal import decimate, welch from cycler import cycler import matplotlib from matplotlib imp...
a1266ed90c378718f41e84d4eab28c0e4b131e12e915af2fd210f5950a49fe7a
Python
49,974
1,076
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/csm/modular_csm.py. # Do NOT edit this file manually as any edits will be overwritten by the generation of # ...
4206cd351e54ca8acb65c57a6df8d9ddcea6541af444687d182450fd01d42f2a
Python
50,143
1,142
""" ===================================================== :mod:`benchmarks` -- Benchmark optimization functions ===================================================== This module provides a set of benchmark problems for global optimization. .. Copyright 2012 Aaron Garrett .. Permission is here...
669f99cf24035c71e9fca14ddcca47edc82ee2b65e22911147a9042114cc7a87
Python
50,335
1,152
# Copyright 2025 The ZhipuAI Inc. team and HuggingFace Inc. team. 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 # # U...
baabca31a84e136ffee8bdef3ee838faf3a61b8061db64672c3cfee68e5ca656
Python
50,363
1,338
""" HemiCET Optimization — Experiments E5, E6, E7 (E4 skipped — too slow) Runs sequentially: E5: HemiCET with 10 channels (8 hemisphere + Fz-Cz idx16 + Cz-Pz idx17) E6: Multi-segment training (up to 5 segments per patient, standard 8ch) E7: Gold-standard freq oracle test (how much room from better freq estimatio...
f2dbc27819c3c8346396aaa0d8f0f4510df3a491b4822aca497af6bf95e6c9d8
Python
50,431
1,126
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/conditional_detr/modular_conditional_detr.py. # Do NOT edit this file manually as any edits will be overwritten b...
e283c187560eee847193e96cbd2d24ec088d48b268fa16608275e52d813559a8
Python
50,462
1,129
# Copyright 2018 The OpenAI Team Authors and 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 copy of the License at # # htt...
b4e2180d8262518271a1e3c7f11533e251cb6ce952b990b91efd197ff700ab9e
Python
50,525
1,205
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/falcon_h1/modular_falcon_h1.py. # Do NOT edit this file manually as any edits will be overwritten by the generati...
189f436a268fe79c691820aa3365513267d34a22e784a7cd8dce4ff9e649a6de
Python
50,553
1,604
"""Define distributed kvstore""" import os import numpy as np from .. import backend as F, utils from .._ffi.ndarray import empty_shared_mem from . import rpc from .graph_partition_book import EdgePartitionPolicy, NodePartitionPolicy from .standalone_kvstore import KVClient as SA_KVClient #########################...
27e0d41ee846b5aa98acf27303ef0404007a6c2500d89c1712e50517fee4f068
Python
50,605
1,289
# Copyright 2022 The Salesforce Team Authors and The HuggingFace Team. 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 ...
cf97cfc6595271873c5f6a6c254cbcbbe6173ce8bcd991ff1743e438cd979930
Python
50,868
1,136
""" Generate IRR comparison figure: expert-expert vs expert-algorithm reliability. Computes ICC(3,1), Percentage Agreement, and MAE for frequency and spatial extent. Compares 4 expert raters (LB, PH, SZ, MW) with PDProfiler (W05) and Tautan et al. Layout: 2x4 subplot Row 1: RDA (LRDA + GRDA) Row 2: PD (LPD + GPD)...
50dd0aa3424a4f7becfda482b92647226a7f7f176eb331bcb3e8e83f1564d91c
Python
50,873
1,148
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/conditional_detr/modular_conditional_detr.py. # Do NOT edit this file manually as any edits will be overwritten b...
50475379016bd421b991289c82f97063e52dcf61dc7ae852df2759aef5125fe9
Python
51,201
1,362
#!/usr/bin/env python """ Collection of plotting functions and utilities for Hi-C analysis Part of ChromaWalker package """ import numpy as np import os import sys #import matplotlib as mpl #mpl.use('Agg') import matplotlib.pyplot as plt import random import copy import matplotlib.gridspec as gridspec from time impo...
6aed8324961c1d48eea18073e34eee37e54c9c232707e940b8c0f2b1899713d6
Python
51,205
1,250
#!/usr/bin/python from __future__ import division __author__ = "Donghoon Lee" __copyright__ = "Copyright 2019, Gerstein Lab" __credits__ = ["Donghoon Lee", "Mark Gerstein"] __license__ = "GPL" __version__ = "1.0.0" __maintainer__ = "Donghoon Lee" __email__ = "donghoon.lee@yale.edu" import numpy as np import pandas as...
4c5f04d5b13b39da1829810a5f7ff2f1138482d7cc0b41029ff6c2f8043b8795
Python
51,317
1,411
""" LRDA Labeling Tool — frequency, laterality, and wave morphology annotation. For each LRDA segment, pre-computes NVO (Narrowband Variance Optimization) across a grid of candidate frequencies. The HTML viewer lets MW: 1. Pick a frequency (buttons or slider) — see per-channel VE heatmap update 2. Label lateralit...
7f3c28b102ec3696ffa21e1307277ae3ee8fe4de5235b51ab13722986af97ce3
Python
51,544
1,232
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/data2vec/modular_data2vec_audio.py. # Do NOT edit this file manually as any edits will be overwritten by the gene...
b1393dd524193e987c340b2cf5131250e640a49f84fd784ce06f16ceb31a35d7
Python
51,868
1,451
""" Spatial Labeling Viewer for PD and RDA EEG Segments. Generates HTML viewers where MW can review and correct model-predicted spatial localization (which brain regions are involved with periodic/rhythmic discharges). For LPD/GPD: uses PDProfiler for channel_probs and region_scores. For LRDA/GRDA: uses PLV-based sco...
7945c4d657cfcbedfba08cefd9c6b848cc089e91ccca83eff9a8f03143753c89
Python
52,122
1,252
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/camembert/modular_camembert.py. # Do NOT edit this file manually as any edits will be overwritten by the generati...
65e3997c4a0a43115411eed711786dbaa65593c43791a5838f66e588f0f0db18
Python
52,134
1,372
#!/usr/bin/env python """ Collection of target set optimization functions and utilities for Hi-C analysis Part of ChromaWalker package """ import numpy as np import os import sys import matplotlib.pyplot as plt import random import copy from time import time import hicutils as hcu import plotutils as plu import hicF...
1e393190959104efe283e8eae1073e608fa635a85847978f8f1c720fec183761
Python
52,201
1,474
""" PD Frequency + Timing Labeler (LPD / GPD). For each segment missing frequency+timing labels: 1. Runs PDProfiler for default frequency/laterality prediction 2. Precomputes HPP discharge times at each frequency button 3. Generates an HTML viewer where MW can: - Select frequency via up/down arrows (or clic...
d5b96b4f32452fc66b125d53849a8e6dfcf85b14f9ea3702ff4fc47c681252c0
Python
52,297
1,269
# Copyright 2025 The HuggingFace Team. 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 applicabl...
a1e7cb015a9bb8f57bf8af86ab674d8bd03f14f6b19375d622c1654b6e77a022
Python
52,480
1,204
# Copyright 2022 Meta Platforms and The HuggingFace Inc. team. 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 # # Unle...
b2fe6d1ac7a4af363efdab06c6c6e5b2708741994a5c024a70c51897268f84cf
Python
52,936
1,157
# Copyright 2022 Microsoft Research Asia and The HuggingFace Inc. team. 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...
c7297dfb28324e89bbfc4ad74e3db8a443854de7ddf384d2019781aca99b5494
Python
52,955
1,446
import pandas as pd import numpy as np import math import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.autograd import Variable from torch.distributions import NegativeBinomial, Normal, Distribution, Gamma, Poisson, constraints from torch.distributions import kl_di...
ea13e4a46a403f7a0d2f211f6d34b9b3d5cccfd39f39d7a546b5cf337e9822f9
Python
53,187
1,286
# Copyright 2025 the HuggingFace Team. 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 applicabl...
3e997324b91fbfea396c1bc2f0013d94fa3e4febfa1cdb244af0d936ef9399d1
Python
53,476
1,237
forceserial = False import os if forceserial: os.environ['MKL_NUM_THREADS'] = '1' os.environ['NUMEXPR_NUM_THREADS'] = '1' os.environ['OMP_NUM_THREADS'] = '1' import numpy as np import matplotlib.pyplot as plt import sys import copy import cPickle as pickle from scipy.ndimage.filters import gaussian_fi...
4a82c41e467f6aee9cb858b34a2fff4dfb29976028026626fb221d46a825870a
Python
53,492
1,271
# Copyright 2026 The HuggingFace Team. 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 applicabl...
0575af98a7d087357cd356f17dc2e4c2ed607276860a9a66dcd4b330b07e3443
Python
53,714
1,342
#!/usr/bin/env python """ Collection of data-file handling functions and utilities for Hi-C analysis Part of ChromaWalker package """ import numpy as np import os import sys import copy from time import sleep import cPickle as pickle import hicFileIO as hfio import msmBasics as mb import msmTPT as mt import matplotl...
70b724009bbe95e9336ec8ad11289c87fc3a116a0da17b06fc6a9ff55284b70c
Python
53,781
1,165
# Copyright 2026 the HuggingFace Team. 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 applicabl...
0401b12f5c3f4c8fc425e2eabfcb6c15a6ae1e7f8de5691ae6ffd6bdb1ea0eb1
Python
53,812
1,328
# Copyright 2020 Microsoft and the Hugging Face Inc. team. # # 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...
405792c8ebd70504d8eb556fd2754e079ab91d819b8a25f36e87731ee9613ea7
Python
53,967
1,331
# Copyright 2022 NVIDIA and The HuggingFace Team. 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 b...
56e3dedc5e1eb99af92b3c316f32efcdc1f3fad1939b364b1bb3a9aa8ca68aef
Python
54,332
1,311
# Copyright 2021 The Fairseq Authors and The HuggingFace Inc. team. 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 # #...
deb68dcf652538a886893af36a159c9ae88bdd6dec19c79ddbf506e6311f34e2
Python
54,364
1,369
# 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 copy of the Licens...
a2864630f1d1793a09e70b615c2f8c04b8ef6c08fbbafefb0538ade916e666b1
Python
54,425
1,222
# Copyright 2023 the Falcon authors and HuggingFace Inc. team. 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 # # Unl...
f3561090b834b94d9ad8f6a0e24ba9a1832518c715ace22d8cd696f00d40a744
Python
54,496
1,211
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/eomt/modular_eomt.py. # Do NOT edit this file manually as any edits will be overwritten by the generation of # ...
994a7ae2094ba7527ac6210f4d0ff92b845ae68bff3447be505144ed3a43e4fa
Python
54,881
1,019
''' Pymol script for quantifying peptide-receptor models. Author: Xiaozhe Ding Email: xding@caltech.edu, dingxiaozhe@gmail.com ''' import platform import sys import argparse import glob import os import csv from datetime import datetime import numpy as np import numpy.linalg as LA from itertools import groupby from...
2f47baaf930fc4c1d562d70316c7cfae440cd390b540fd3d57c4f590d91f11b9
Python
54,900
1,266
# Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved. # # This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX # and OPT implementations in this library. It has been modified from its # original forms to accommodate minor architectural differences compared # to GPT-NeoX and OPT...
7a8fa98d08fccad6b5e3328a15fe84f2444fd0e36ada392e9b3996a5cb7a218f
Python
54,947
1,295
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/granitemoehybrid/modular_granitemoehybrid.py. # Do NOT edit this file manually as any edits will be overwritten b...
6ca524d7a1aa57bb4ece08a23f8ca78cdaff8d25494264e6cf29e6b906827a96
Python
55,006
970
# -*- coding: utf-8 -*- """ Functions for Cb Stellate model """ __author__ = "Nils A. Koch" __copyright__ = "Copyright 2022, Nils A. Koch" __license__ = "MIT" import h5py import gc import scipy import json import copy import os import numpy as np from numba import types, njit from numba.typed import Dict from scipy ...
a801ec166e37523ee6b1c0805c9b8dcad7b32e68e15b1dc4c2dd99e4f0212da3
Python
55,243
1,222
# Copyright 2026 The HuggingFace Inc. team. All rights reserved. # Modifications Copyright (C) 2025, Advanced Micro Devices, Inc. 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 Lic...
1f545081a3a829fc02dc8d1905658e1ab4ec511e7f15582fa395a3e846c66cc3
Python
55,285
1,516
# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates # SPDX-License-Identifier: Apache-2.0 # mypy: disable-error-code="attr-defined" """Frequency optimization and estimators for the molecular LIT workflow.""" from __future__ import annotations import hashlib import logging import jax import numpy as np from ja...