sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
eeec3ed11550cc501ad47b8b1b26a75f77b62ee992d28d18ae4c968eaa9fff31 | Python | 39,269 | 978 | import os
import numpy as np
import pandas as pd
from repli1d.analyse_RFD import nan_polate, smooth
from repli1d.models import jm_cnn_model
def normal_seq(signal, q=99, output_path='../data/'):
"""
normalization function that transforms each fature in range (0,1)
and outputs the minimum and maximum of f... |
cc36fbc0437f92e0f78434eb4e8df84253c5e247343146f6f4bb833277f5c450 | Python | 39,272 | 1,061 | import os
import re
import unittest
from collections import defaultdict
from sys import platform
import backend as F
import dgl
import pytest
import torch
import torch.distributed as dist
import torch.multiprocessing as mp
from dgl import graphbolt as gb
def test_ItemSampler_minibatcher():
# Default minibatcher... |
96e4dbfcb103afdcc2a784191c2bdbf53ddd8883232402b2553a97bde7bb3ca7 | Python | 39,300 | 1,221 | import numpy as np
import copy
#np.random.seed(0)
nc = 0
#import pylab
def comupute_enhanced(proba, actual_pos,cascade={}):
#assert()
infl = cascade["infl"] #,50)
amount = cascade["amount"] #,4)
down = cascade["down"]#,10)
damount = cascade["damount"]#,1 / 10000.)
cproba = np.zeros_like(pro... |
1f3895d029cb1ad740e0f823d6ffcf01b982924f3db039ec56bd9327c98e0d43 | Python | 39,457 | 844 | # 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
# This file was automatically generated from src/transformers/models/mask2former/modular_mask2former.py.
# Do NOT edit this file manually as any edits will be overwritten by the gene... |
fc1304d03e71a4a49e10001cbff1cbf35d701ae3081cf8d2256ffe430e9e5c17 | Python | 39,592 | 1,055 | # Copyright (c) 2026 ByteDance Ltd. and/or its affiliates
# SPDX-License-Identifier: Apache-2.0
# ruff: noqa: DOC201,DOC501
"""Load saved signed-LIT outputs for the article's single-width line fit.
The workflow writes raw transforms and their sampling metadata. This module
validates and combines those archives, sele... |
db0478bd3345e10ee2132d34603e084fb39fad496c13a11ce438b8699ba9649f | Python | 39,650 | 970 | # 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
# This file was automatically generated from src/transformers/models/florence2/modular_florence2.py.
# Do NOT edit this file manually as any edits will be overwritten by the generati... |
8f9b592240da490075cc9e9b99d3cac55018fbb16c87c9289d06bb994951ca57 | Python | 39,744 | 889 | # 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
# This file was automatically generated from src/transformers/models/minimax/modular_minimax.py.
# Do NOT edit this file manually as any edits will be overwritten by the generation o... |
c4495bc30e89b06d748aaabe63a2e521b13a40227e0530ba44fb1d6460f1b786 | Python | 39,765 | 690 | # 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... |
fc90877e4f756860230ebdecd121e9052d94b962afa3c69bf9e99ac3f1a27958 | Python | 39,774 | 1,112 | # Copyright (c) 2026 ByteDance Ltd. and/or its affiliates
# SPDX-License-Identifier: Apache-2.0
# ruff: noqa: DOC201,DOC501
r"""Single-width discrete-line fits for molecular Lorentz transforms.
This module implements the line analysis in main-text Eq. (local_lit) and
Supporting Information Eq. (single_width_fit):
..... |
d7cebeef016fb92c133334f2075df60a1946931cf3d20c94078bcb7f5bcec262 | Python | 39,838 | 1,050 | import copy
import math
import warnings
from functools import lru_cache
import dask as da
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from .dio_data import _DioData
from .parameter_data import _ParameterData
from .ts_data import _TsData
from .utils.visualization import (
_plt_add_ax_con... |
75f942b258c00c7aad4a12ee9aca33c0fc0ffbc44e03cdc40900f66bd18d75ab | Python | 39,857 | 944 | # Copyright 2025 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... |
515c5836f1917a22e655aacec8688fda0656d57bc85f2ddf46a269c70894d5ab | Python | 39,859 | 1,155 | # Copyright (c) 2025-2026 ByteDance Ltd. and/or its affiliates
# SPDX-License-Identifier: Apache-2.0
from functools import partial
import chex
import jax
import numpy as np
import optax
import pytest
from jax import numpy as jnp
from jax.flatten_util import ravel_pytree
from jaqmc.optimizer.sr.jasr import (
Fish... |
1c9702dca600ada9f2bef2316f091be2520fef6c002a786f7300829190e38617 | Python | 39,867 | 972 | # Copyright 2023-present NAVER Corp, The Microsoft Research Asia LayoutLM 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... |
ce6e4e69671c09a2ea3bfdd95aa4edd64d6bf166b142613c86bf9a2749f64996 | Python | 39,873 | 1,024 | #!/usr/bin/env python3
import os
import json
import itertools
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation, PillowWriter
from matplotlib.collections import LineCollection
from matplotlib.colors import LinearSegmentedColormap
from mpl_toolkits.mpl... |
d34949085a94acfe09a265cdaaf2dcb9eb7574ae676341cfdee9007c8c48260e | Python | 39,886 | 1,211 | """Provides tests for the pipeline creator module."""
# Authors: Federico Raimondo <f.raimondo@fz-juelich.de>
# Sami Hamdan <s.hamdan@fz-juelich.de>
# License: AGPL
import warnings
from collections.abc import Callable
import numpy as np
import pandas as pd
import pytest
from numpy.testing import assert_arra... |
440c70d5ba7cd0deeaf3dbe9141c66fdfa447fb8ca6626f41077b036140b452a | Python | 39,916 | 1,001 | # Copyright 2018 The Microsoft Research Asia LayoutLM 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/LICENS... |
e9e1aaa79c21c230dac723d7aad117d76d09870f6b05fc6877ab9532085c75d4 | Python | 39,945 | 965 | import inspect
import logging
import sys
import numpy as np
from scipy import sparse
from scipy.sparse.linalg import eigsh as _eigsh
from ._cholmod import CholeskyFactor, require_cholmod
from .tet_mesh import TetMesh
from .tria_mesh import TriaMesh
logger = logging.getLogger(__name__)
# Evaluated once at import tim... |
09487037ffdf8efb13bdff3d1950ca2a04998758d77687058ea91e664ffcc371 | Python | 39,966 | 975 | # Copyright 2021 The Facebook, 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
#
# ... |
d1419d3e88dd6fab3df9915666a14090e555717e552874b1cabb6e876b4c7dda | Python | 39,974 | 1,071 | import os
import shutil
import numpy as np
import multiprocessing as mp
import tensorflow as tf
from functools import partial
from glob import glob
from os import listdir
from os.path import exists, isfile, join
from random import randint, shuffle
from rich.progress import track, Progress
from rich import print as rich... |
437d56e0648fad9cc84d997cd1bfadf7a854e8b838094535bf70f13eec9d5526 | Python | 39,993 | 782 | # Copyright 2026 OpenBMB 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 requ... |
87074aa149a0669486635721c5964b04ae1369083166ade524319a35204e97b4 | Python | 40,042 | 894 | # Pytorch stuff
"""
Importage
"""
#from Model_pytorch import wwd_model_pytorch_new
import matplotlib.pyplot as plt # for plotting
import numpy as np # for numerical operations
import pandas as pd # for data manipulation
import seaborn as sns # for plotting
import time # for timer
import torch
import torch.optim as o... |
8997622b935cfefb0e11a485c42293d25e48fa1d32a3610bbbaba9d943a4856f | Python | 40,042 | 967 | # python standard library imports
import math
from typing import List, Union
import dask.array as da
# scientific computing library imports
import numpy as np
from numba import jit, njit, prange
from numba.typed import List
@njit(nogil=True)
def heappush_min(heap, item, end, heap_indices, tracking_index, index_wind... |
6b76fc859e701937fcb0435b58ff005ddd8d1169bb77074854c962bc6987effd | Python | 40,122 | 1,254 | """Define graph partition book."""
import pickle
from abc import ABC
import numpy as np
from .. import backend as F, utils
from .._ffi.ndarray import empty_shared_mem
from ..base import DGLError
from ..ndarray import exist_shared_mem_array
from ..partition import NDArrayPartition
from .constants import DEFAULT_ETYPE... |
5c8283d0630ddb08a9dd50f6cb5b70eb7fa9b76e44b206007c46e9a0a64d0c6c | Python | 40,163 | 935 | # 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
# This file was automatically generated from src/transformers/models/exaone4_5/modular_exaone4_5.py.
# Do NOT edit this file manually as any edits will be overwritten by the generati... |
2c4cfd94ca4feb2dd3a4786a961ebac2814d2769ad7ec370c5b0ef05806fe2c1 | Python | 40,164 | 882 | # 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
# This file was automatically generated from src/transformers/models/mask2former/modular_mask2former.py.
# Do NOT edit this file manually as any edits will be overwritten by the gene... |
042c9686bc29d4d5ace0f8980527092549215be5b34c6407eb72c4baf6e5b953 | Python | 40,208 | 1,026 | from __future__ import annotations
import numpy as np
from minigrid.core.world_object import WorldObj
from minigrid.envs.babyai.core.verifier import (
AfterInstr,
AndInstr,
BeforeInstr,
GoToInstr,
ObjDesc,
OpenInstr,
PickupInstr,
PutNextInstr,
)
class DisappearedBoxError(Exception):
... |
7fe824b1f53fa9de879b01da92c250b97f66a46884bc40a8eab12be9a1b2ad02 | Python | 40,318 | 1,077 | """GraphBolt OnDiskDataset."""
import bisect
import json
import os
import shutil
import textwrap
from copy import deepcopy
from typing import Dict, List, Union
import numpy as np
import torch
import yaml
from ..base import etype_str_to_tuple, ORIGINAL_EDGE_ID
from ..dataset import Dataset, Task
from ..internal impo... |
3ee11e9fd04ef64e3cc5341852d32a91f4d531b39f56ce194af4c2b828ba0395 | Python | 40,328 | 849 | # 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
# This file was automatically generated from src/transformers/models/llava_next_video/modular_llava_next_video.py.
# Do NOT edit this file manually as any edits will be overwritten b... |
2d1ef7b7e0c4c28d6553d4f518131fc08da7215227df625409ead807a7e27c7e | Python | 40,333 | 1,195 | import torch as th
from ..._sparse_ops import (
_bwd_segment_cmp,
_csrmask,
_csrmm,
_csrsum,
_edge_softmax_backward,
_edge_softmax_forward,
_gather_mm,
_gather_mm_scatter,
_gsddmm,
_gsddmm_hetero,
_gspmm,
_gspmm_hetero,
_scatter_add,
_segment_mm,
_segment_mm_... |
7f3a5f557a67c435611356ea0f507ca8a21033fbf13b3ec63704f1057877c52d | Python | 40,335 | 1,035 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 3 15:31:24 2019
@author: kai
"""
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 26 15:23:52 2019
@author: kai
"""
import numpy as np
import pandas as pd
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as ... |
a6abd8fd5016adc8f40857cfd6feef15808df7c3a2d4cc77b495a815da8de836 | Python | 40,340 | 989 | # 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
# This file was automatically generated from src/transformers/models/chinese_clip/modular_chinese_clip.py.
# Do NOT edit this file manually as any edits will be overwritten by the ge... |
31f98e84b1b028c315a77da5c3fb6f14a2a2cefad04d123782a939caad308c4f | Python | 40,364 | 739 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Aug 29 13:06:05 2019
@author: kai
"""
import argparse
import os
import numpy as np
import yaml
import io
import copy
import matplotlib
from utils import sorted_alphanumeric
try:
from savelouts_best import main as modeloutputs_main
from regress... |
a731db39b32b7c35d9ec3d1095c975db97b0fd003524ca1d6fb3fdd19c27cea6 | Python | 40,482 | 1,122 | """Faster RCNN Model."""
from __future__ import absolute_import
import os
import warnings
import mxnet as mx
from gluoncv.model_zoo.faster_rcnn.rcnn_target import (
RCNNTargetGenerator,
RCNNTargetSampler,
)
from gluoncv.model_zoo.rcnn import RCNN
from gluoncv.model_zoo.rpn import RPN
from gluoncv.nn.feature ... |
f3abd19adb95773caed75d38adf336b9ba17ce59b14fc648a9c6850fd04ab2be | Python | 40,508 | 1,183 | """
====================
Data storage handler
====================
This data handler use [PyTables](https://www.pytables.org/) that is built on top
of the HDF5 library, using the Python language and the NumPy package. It
features an object-oriented interface that, combined with C extensions for the
performance-critica... |
632694474e69b6fbae654707f4a9758456db588a67500a7bdb19e6022249b180 | Python | 40,766 | 989 | """
Command-line helper for MST classifier training.
This module is launched by `mst_classification_learn.py` inside the
`mst_classify` environment. It receives a pickled training payload on stdin,
builds MST datasets, trains the selected classifier with PyTorch Lightning, and
writes training artifacts to the requeste... |
6746496da01692f7e4acde5e2ba068d1aba1708699fd072be7fbe4d1e0abb87c | Python | 40,811 | 906 | # 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
# This file was automatically generated from src/transformers/models/axk2/modular_axk2.py.
# Do NOT edit this file manually as any edits will be overwritten by the generation of
# ... |
026277863e6f21fcd0c5da6b6482ffbccf1c33caeb426c9587abab078473ddbf | Python | 40,829 | 926 | # 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
# This file was automatically generated from src/transformers/models/kyutai_speech_to_text/modular_kyutai_speech_to_text.py.
# Do NOT edit this file manually as any edits will be ove... |
619d2127f66a93b51ac21aa6927d0524413299d4f45bf171e03ef91f73574269 | Python | 40,890 | 1,241 | # coding=utf-8
# @license
# Copyright 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... |
c98e7471b750af2450a2d1e75ae66664e29fa04ab49b9b3d79e7d3e26b6c3836 | Python | 40,968 | 1,436 | """Provide tests for the API."""
# Authors: Federico Raimondo <f.raimondo@fz-juelich.de>
# Sami Hamdan <s.hamdan@fz-juelich.de>
# License: AGPL
import platform
from pathlib import Path
import joblib
import numpy as np
import pandas as pd
import pytest
import sklearn
from sklearn.base import clone
from sklea... |
1fda08460050830794a543826e04bba64c4686108f4a2fa3b18903ff3c6952b6 | Python | 40,988 | 1,243 | # Copyright 2021 AlQuraishi Laboratory
# 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
#
# U... |
974fd0f5c497d605896125af0486a67acda22d34ddf3c45f3c50c452fdcccc8c | Python | 40,996 | 976 | # Copyright 2022 HuggingFace Inc. team and BigScience workshop.
#
# 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 appli... |
d1e8207a000556cefabe87d5c3e44233e8abd8afb29008ed32612a9e2c0b3f66 | Python | 41,113 | 1,044 | # Copyright 2021 Google Research 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
#
# Unl... |
21f0c81b1d9765885ab06b7f4d7aaba86f5d0aec17587a1dd96ebd9c5c089865 | Python | 41,264 | 711 | # Copyright 2025 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 ... |
97d5e9226a87a59783bc7984109a2bd273913be7472f00edb0dc328b8eb5798b | Python | 41,526 | 1,053 | import os
from collections import namedtuple
from typing import (TYPE_CHECKING, Any, Callable, Dict, List, Optional, Tuple,
Union)
import numpy as np
import shapely.geometry as sg
from mpl_toolkits.axes_grid1.inset_locator import mark_inset, zoomed_inset_axes
from threading import Thread
import sl... |
45d38508661a8d186feae86859ad0f0a854711e27599ba9bbfd43823c788d6da | Python | 41,591 | 990 | # Copyright 2022 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... |
b43f23a06c631d4e2368b5d380801ad4b5b352f11a36343ceb0129f814e82fd4 | Python | 41,616 | 1,174 | """
Generate publication-quality EEG characterization figures for the paper.
Creates 4 HTML files in paper_materials/:
- figure_lpd_examples.html
- figure_gpd_examples.html
- figure_lrda_examples.html
- figure_grda_examples.html
Each shows 3 examples (easy, medium, hard) with:
- 18-channel bipolar EEG with ... |
23425b1a750b56c68d8ff187279dff04bce74029642f3e4bd0e853063c0284ed | Python | 41,620 | 1,143 | # import libraries
import os, shutil
# import click
import numpy as np
import pandas as pd
import nibabel as nib
import glob
import deepdish as dd
import time
import copy
from scipy.stats import mode
from random import seed, sample
from collections import defaultdict
from pathlib import Path
from SUITPy import flatma... |
7569da2288836f6580a672fbc6e9c14ca05d183ac85ef26f87d2640a76f5727e | Python | 41,715 | 1,011 | # Copyright 2021 The Facebook, 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
#
# ... |
589b08dd3eb4d3d3be9f3bfcffbeb5887baaeb7a9379b6fc089f7f6dba66d3e7 | Python | 41,745 | 954 | # Copyright (c) 2026 ByteDance Ltd. and/or its affiliates
# SPDX-License-Identifier: Apache-2.0
"""Molecular dipole LIT workflow."""
from __future__ import annotations
import logging
import time
from functools import partial
from typing import Any
import jax
import numpy as np
from jax import numpy as jnp
from jaq... |
ff1e1e526ddacc9111bbd454049c720fccfd694c9e70edbb42e3f958b2674279 | Python | 41,775 | 1,043 | # Copyright 2024 The Rhymes-AI Teams 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... |
5f3b732e63af51e216b7b009e85d2ffd994ca633014e31dda8d79602a6bc5b6a | Python | 41,781 | 938 | # Copyright 2022 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... |
923be1933a29b4d5e23ef24f15d0d5969884b6a15d4b7c90dadb5924f2ef100d | Python | 41,869 | 867 | # Copyright 2025 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
#
#... |
9fabc07910a8b2c9221177313d9efb12e3726a5bbfc767ac41bb3db9e6c9749b | Python | 41,897 | 982 | """
Discover approved nodule markups directly from dataservice and upload them to
the blackboard, without any pre-downloaded series/lesion tracker CSVs.
For each qualifying (study, series), the oldest-approved reader's markups of
`--abbrv` are selected. The reference series (`--series_description`, default
512x512) is... |
2a23e31304d415087be2edcd471f494449a685d2af973c6d278b288cb3163482 | Python | 41,903 | 1,156 | # Test harmonypy
"""
Run just the small test (good for Github actions):
uv run pytest
The small test data is available on Github.
Or run all of the tests (good for local development):
uv run tests/test_harmony.py
The medium and large data will be downloaded automatically.
"""
from time import time
import ... |
a78e044d6b1ac78ff64213bbca48c318734ea9d31ed8b2762f387f6c6d5e6bd0 | Python | 41,980 | 782 | # 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 ... |
c329ce58686ab7169647533c8a35f88ae5b41283595f1fae615c1a5b8f604cee | Python | 42,045 | 1,115 | # Copyright 2024 The Apple Research 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-... |
55f0c1c4a006581e11f865433e68483858cc3a318570a33eb41640cf8162df7a | Python | 42,084 | 1,034 | #!/usr/bin/env python3
"""
BIDS Dataset Integrity Checker
Quick scan to detect data loss issues:
1. Missing JSON sidecar files for NIfTI images
2. Missing NIfTI files that have JSON sidecars
3. Corrupted or unreadable NIfTI files
4. Malformed or empty JSON files
5. File size anomalies
Outputs summary statistics of pr... |
ae903db5256f7a8f51caa238cc23ed917e8907078d82408821856e46e152a7a4 | Python | 42,183 | 1,045 | # Copyright 2022 Meta and The HuggingFace Inc. team. All rights reserved.
# Copyright (c) 2025, 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
#
# ... |
d7f76036baa9be4abe64de0d43985dc4410a70526178be5a29c01ba1d2ae9b24 | Python | 42,263 | 1,209 | """
Combined RDA Frequency + Spatial Extent Labeler for LRDA/GRDA segments.
Labels both frequency and spatial extent (per-channel involvement) in a single
UI. Targets segments with >=10 IIIC votes that need either frequency OR spatial
extent labels from MW.
UI: EEG with narrowband overlay + channel involvement toggli... |
fb0258868fb14144c08debeab2e4c2fd6f4ff44fe6c85ef8ecc724897dde2eab | Python | 42,303 | 1,027 | # 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
# This file was automatically generated from src/transformers/models/kimi_linear/modular_kimi_linear.py.
# Do NOT edit this file manually as any edits will be overwritten by the gene... |
b0c806489f91fa126d0d8f8fd20276936144b524d7902ea57795c88cf640e52d | Python | 42,312 | 927 | # 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... |
450a3c77d414ec813fc500f8fac62e0790c087ed0a4187eb95f64d4650dd656e | Python | 42,388 | 972 | #!/usr/bin/env python3
"""
Fetch tool outputs from a live SimpleMind blackboard and serialize them as JSON.
This script is intentionally strict and side-effect light:
- Reads BB posts by index via smcore HTTPTransit.
- Filters posts by tool/dataset/sample/plan tags.
- Deserializes known SMTool payload types.
- Generat... |
1cd9bb07cb0b9a52472e1ba507a80d1b16eb18b1e0a508d47b12f2c04c7b4fc6 | Python | 42,503 | 1,425 | """Provide tests for parcellations."""
# Authors: Federico Raimondo <f.raimondo@fz-juelich.de>
# Vera Komeyer <v.komeyer@fz-juelich.de>
# Synchon Mandal <s.mandal@fz-juelich.de>
# License: AGPL
from pathlib import Path
import nibabel as nib
import numpy as np
import pytest
from nilearn.image import... |
6d66cbbd3f9fb93c75abeddcf7520dba55af686b3a131a314ca0cb520232e2af | Python | 42,589 | 873 | #!/usr/bin/env python3
""" ImageNet Training Script
This is intended to be a lean and easily modifiable ImageNet training script that reproduces ImageNet
training results with some of the latest networks and training techniques. It favours canonical PyTorch
and standard Python style over trying to be able to 'do it al... |
c55c58357775bf033c3fb0d98f9b08d2845dc909ff2bc70dc3e448139e49bbf4 | Python | 42,632 | 949 | # Copyright (c) 2022-2026 ByteDance Ltd. and/or its affiliates
# SPDX-License-Identifier: Apache-2.0
'''
Entry point of the DMC implementation.
'''
import time
from typing import Optional, Union
from absl import logging
import attr
import jax
import jax.numpy as jnp
import numpy as np
from .branch import branch as ... |
1d2a36b8b766018dfc459ff22c82841d7eb1f3250f4c17443e99785f7f3bb16d | Python | 42,649 | 1,152 | # Copyright (c) 2025-2026 ByteDance Ltd. and/or its affiliates
# SPDX-License-Identifier: Apache-2.0
import dataclasses
from collections.abc import Callable, Sequence
from enum import Enum
from functools import partial, reduce
from typing import Any, Literal, NamedTuple, overload
import jax
import numpy as np
import ... |
785b88b889d37eb6cc1b43d5e679a2d899015ffacbe84261dde774efd88815da | Python | 42,659 | 862 | # Copyright 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 applicabl... |
6fc1553f3969865be8f6b27ead6f5be3b48674a94206d2edfd4c2a80a3a24d1a | Python | 42,682 | 868 | # 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 ... |
e5768e33ff89d89ee8e2f9693d580803aa3ed2d12be2b12da958d45cf18f7381 | Python | 42,737 | 1,247 | # Copyright (c) 2025-2026 ByteDance Ltd. and/or its affiliates
# SPDX-License-Identifier: Apache-2.0
"""Sphinx directives for rendering contextual config defaults in docs.
Usage in MyST markdown::
```{eval-rst}
.. config-context::
:preset: jaqmc.app.molecule.workflow.MoleculeTrainWorkflow.default_pres... |
74128bcd405393b7276164833f802ae8b75bcf10257065502a2c19d325b0f86f | Python | 42,745 | 1,096 | # 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 ... |
5c3d0b3a57ecdc6c27f9f4e59ef1e3b23852c1ee299fc7f4ddc446998d065dde | Python | 42,759 | 1,351 | import os
os.environ["OMP_NUM_THREADS"] = "1"
import math
import multiprocessing as mp
import pickle
import socket
import sys
import time
import unittest
from multiprocessing import Condition, Manager, Process, Value
import backend as F
import dgl
import dgl.graphbolt as gb
import numpy as np
import pytest
import to... |
d967a51c964582bdb2afef141b6929b7ba4b516dbad9d681d38f9bf126cc839f | Python | 42,924 | 1,049 | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
#
# Copyright The NiPreps Developers <nipreps@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obta... |
856e40e86e2fedaa1a72df1b78226bce506d423ff929bc39df14e003eb6b58fe | Python | 42,962 | 1,139 | """Torch Module for PGExplainer"""
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from .... import batch, ETYPE, khop_in_subgraph, NID, to_homogeneous
__all__ = ["PGExplainer", "HeteroPGExplainer"]
class PGExplainer(nn.Module):
r"""PGExplainer from `Parameterized Explainer for G... |
7e0c1bb8c01df52d3e73613f59c6dddbd7240824de56aa4c1edd720ae2bbe5b0 | Python | 42,990 | 1,098 | """Neighbor subgraph samplers for GraphBolt."""
from functools import partial
import torch
import torch.distributed as thd
from torch.utils.data import functional_datapipe
from torch.utils.data.datapipes.iter import Mapper
from ..base import (
etype_str_to_tuple,
get_host_to_device_uva_stream,
index_sele... |
fc9b353404146ae6fcf5c3d846a0a8ab718f1353059d57ac2cc46a02c8ddbf63 | Python | 43,020 | 1,172 | import inspect
import json
import multiprocessing as mp
import subprocess
import os
from helpers import (get_contrast_agent, get_fmriname, get_readoutdir,
get_relpath, get_taskname, ijk_to_xyz)
class ParameterSettings(object):
"""
Paths to files and settings required to run DCAN HCP. C... |
f0773602219ba053297c0509ae01788f27df3239de9b6f7f8d506714076da37b | Python | 43,048 | 1,074 | """Find and remove the handles of closed triangle meshes.
Each handle of a closed surface, one unit of its genus, comes with two non-trivial loops that
cross each other once. Cutting the surface along either loop and closing both openings with
disks removes the handle. Along one loop this cuts a bridge, along the othe... |
d6f420794b9515a36d0a7bc3c473807b6c266f1fe84bb3b812330a65d3d404bd | Python | 43,081 | 953 | # 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
# This file was automatically generated from src/transformers/models/hy_v4/modular_hy_v4.py.
# Do NOT edit this file manually as any edits will be overwritten by the generation of
# ... |
355b0080a6cf33a3ef7acb94721dd16b07fafd580ea18b0874c56f2b2c4089c4 | Python | 43,088 | 956 | # Copyright 2026 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... |
b7165adf38a6d82067d89a6e39066f4d9eb208fb776f4f133899a20ef7db583c | Python | 43,230 | 1,266 | import json
import numpy as np
import pytest
from ...tria_mesh import TriaMesh
@pytest.fixture
def tria_mesh_fixture():
"""
fixture is a method to parse parameters to the class
only once so that it is not required in each test case
"""
points = np.array(
[
[0.0, 0.0, 0.0],
... |
389cdcab0ffb90e30f923f38ea36e9a72fcde2ad4577056b727dca7ade8550ac | Python | 43,342 | 921 | # 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
# This file was automatically generated from src/transformers/models/lightglue/modular_lightglue.py.
# Do NOT edit this file manually as any edits will be overwritten by the generati... |
509f7d761a208e22566fc49b942b83ed35c0c66d901aa24aa19bc5afb05b829e | Python | 43,389 | 1,276 | """
LPD Laterality + Timing Labeler.
Adapted from HPP labeler. For each unlabeled LPD segment:
1. Runs HemiCET+DP for default laterality prediction
2. Precomputes HPP discharge times at each frequency button
3. Generates an HTML viewer where MW can:
- Label laterality (1=left, 2=right)
- Select frequen... |
2fd8557dcf8a79dfe045c74938820308a7b38817a3d015a90cfde7356e533427 | Python | 43,412 | 1,045 | # Copyright 2021 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... |
eeb7b7da07f95d9d25c37552a48a36db801c3f317737539a5a1e706622401b75 | Python | 43,484 | 1,011 | import os
import json
from glob import glob
from shutil import move
# Add any other missing imports if needed
def check_outpath(bids_dir, subject_label):
"""
Check if output paths exist, if not create them.
Parameters
----------
bids_dir : str
Path to BIDS root directory.
subject_la... |
13863ac1f6e52eeee6ab6afc2d521e3681f44c815eada5f8086ddaaf567a8358 | Python | 43,531 | 1,356 | from __future__ import annotations
import os
import uuid
import sys
import json
import hashlib
import shutil
import subprocess
import shlex
from typing import Iterable
import asyncio
import curses
import re
import copy
from typing import Any, Dict, IO, List, Optional, Tuple, Awaitable, Union, Iterator, Sequence
from d... |
4ace349e4982dde55df16c3ddec86c616e4c161757bc99c265a288eff4c5d89c | Python | 43,607 | 1,164 | # Copyright 2023 The Google Research 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... |
87d6081fe563aa3ec0665f81727f1b6f20af85698f4695188010e5ba621c3ecc | Python | 43,667 | 931 | # 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
# This file was automatically generated from src/transformers/models/embedding_gemma2/modular_embedding_gemma2.py.
# Do NOT edit this file manually as any edits will be overwritten b... |
874579a6c5ce1f75d7ebd87e4321266000597c3e06209d16cf858fe2b822be0b | Python | 43,730 | 1,036 | # -----------------------------------------------------------------------------
# Copyright (c) Yongning Lei 2024-2025
# All rights reserved.
#
# This script is distributed under the Apache-2.0 license.
#
# power_analysis_ohbm.py
# ----------------------
# Cross-session power analysis for OHBM.
#
# 1. Loads ALL session... |
1ee2c84887818c03d9ee919d42cad165168a2997956900a41763483c6f295c30 | Python | 43,761 | 1,103 | # 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
# This file was automatically generated from src/transformers/models/altclip/modular_altclip.py.
# Do NOT edit this file manually as any edits will be overwritten by the generation o... |
8058093be5a073b0b72e9dcc5849008f83cb1a3076daf6cbd60dd0e82e0906af | Python | 43,853 | 1,030 | #!/usr/bin/env python3
"""Independent-expert v1 inter-rater reliability (IRR) analysis.
Compares pairwise agreement among MW, SZ, TZ, and the GROND algorithm
on the four 200-segment task subsets defined in
paper_materials/independent_expert_tasks/<subtype>/manifest.csv.
Hypothesis under test:
Each rater agrees wi... |
cc977c2c63eaa68894273a3e2cadb40beaa6253a7a6f02d3507db8f7997e728c | Python | 43,859 | 1,067 | # Copyright 2026 NVIDIA Corporation 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
#
# ... |
ccc3708df8ff9a1b23ff6d66e1f85b4b6dc3ae1114b93db78ed5ecf47fbae75f | Python | 43,889 | 1,017 | #!/usr/bin/env python3
"""Build a JSON skills graph for explorer from local SimpleMind registries."""
from __future__ import annotations
import argparse
import json
import re
from pathlib import Path
from typing import Any
import yaml
TOOL_REFERENCE_PATTERN = re.compile(r"\bfrom\s+([^\s]+)", re.IGNORECASE)
def l... |
4fc58d295111dff7ef8aa67a280896bcd64ca98fbe6625f99dab1e132ce16d95 | Python | 43,945 | 979 | import math
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import yaml
# import slayer_cuda
import slayerCuda
# import matplotlib.pyplot as plt
# # Consider dictionary for easier iteration and better scalability
# class yamlParams(object):
# '''
# This class read... |
c27e23a62e09bb4561c63a1206d26ec3f1951de98344c488c8e7cf37ffd8bb59 | Python | 44,016 | 1,106 | # Copyright 2022 Microsoft Research 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
#
... |
2c8e2eacc98bcd3ff07f999e6c74e15fc8817fe7a88ba08d094c1de904a2cc33 | Python | 44,080 | 938 | # 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... |
333587d7da075f80b2dffe5dac88a3cc8a3ab8498822cefd721a36a07e29ef56 | Python | 44,364 | 1,045 | #!/gpfs/milgram/project/turk-browne/or62/conda_envs/myenv_multimem/bin/python
import warnings
import sys
from webencodings import labels
if not sys.warnoptions:
warnings.filterwarnings("ignore", category=DeprecationWarning)
import os
import nibabel as nib
import numpy as np
import nilearn as ni
import seaborn as ... |
8cc0e5c3d5d23080bb2605cdf3b32b6a5c978be66c7866bb629dd15f9cecb057 | Python | 44,669 | 882 | # 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
# This file was automatically generated from src/transformers/models/gradium_phonon_tts/modular_gradium_phonon_tts.py.
# Do NOT edit this file manually as any edits will be overwritt... |
75591cc68abd501025db6672a0d4f0a661f5cf666dcc621e930c81689afb012c | Python | 44,698 | 1,102 | # Copyright 2025 Deepseek AI 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 requi... |
e78e4d694740959391848456b0dc1a97246b9d3c3d7b311d3f28c717401a57af | Python | 44,725 | 1,085 | # 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
# This file was automatically generated from src/transformers/models/jamba/modular_jamba.py.
# Do NOT edit this file manually as any edits will be overwritten by the generation of
# ... |
e47272c334772ab2db87277491420f20fc8fc07af783d557c2f61e0544e67d4a | Python | 44,735 | 1,086 | # 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
# This file was automatically generated from src/transformers/models/bamba/modular_bamba.py.
# Do NOT edit this file manually as any edits will be overwritten by the generation of
# ... |
22b368ed0581f4a10791c59f58040cf8481584eeb5bb16b887101075c55adcef | Python | 44,740 | 921 | 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.