sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
4c3a52cc126c6aa618a246eb3e9a603cc1aab461d3d57df3c583fc8550cca64d
Python
75,685
2,095
# Copyright 2018 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 ...
3c0c2dff618d2debf1d29a7d813f50cc3dd6274d7f911381404f0b7ce93cfecf
Python
75,799
1,489
# Copyright 2024 The HuggingFace Inc. team. # Copyright (c) 2020, 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 # # http://www.apache.org/licen...
7f99425a1cbe1e16ab4744ddd89c9cde51393e474b0a7d94bbfa1666bf08f01f
Python
75,925
1,630
# Copyright 2019-present CNRS, Facebook 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 requi...
fb8d08afa66c3c4e6f798cf7e68179214e9766667351941c19467d7aba14a05a
Python
77,558
2,049
""" Controller: run_plan ================================= Description: Batch Controller: A SimpleMind controller for running a pipeline. A pipeline run requires a plan + dataset. It processes each sample in the dataset before terminating. For supported uploaders, `run_plan.py` can reuse a ...
3210d3821c81a32855b30fa440422a39f1ce8a09d3370d93176eb5f5f924aba0
Python
77,941
1,937
import csv import os import pickle import queue import sys import threading import time import warnings import multiprocessing as mp from collections import defaultdict from math import isnan from os.path import exists, join from typing import ( TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union, Iterable, Call...
1dc7393c671868b8f8e7354e011cb32372a4b13b74b910f9ddae127147c9e0a7
Python
77,946
1,712
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/deformable_detr/modular_deformable_detr.py. # Do NOT edit this file manually as any edits will be overwritten by ...
350ce0aa830f14771ddb22192c374da3da2e92f859d8f5cec6d307f9637e8bea
Python
78,258
1,703
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/glm4v_moe/modular_glm4v_moe.py. # Do NOT edit this file manually as any edits will be overwritten by the generati...
d48940d3368c59c6b692453ed37ac18c45b5c3745e0d05e85241b7b08a0064ed
Python
78,404
2,087
# ----------------------------------------------------------------------------- # 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...
4e6921f3e341aa36c7ed8030a60a99a376c498ed1861eda31aed71b81287bf60
Python
78,680
2,021
"""Functions for partitions. """ import concurrent import concurrent.futures import copy import json import logging import multiprocessing as mp import os import time from functools import partial import numpy as np import torch from .. import backend as F, graphbolt as gb from ..base import dgl_warning, DGLError, ...
f6c3936b12b462c9548469bbf4c46aae888bc513aaa6e97cf2b4b1f53bc7c5f1
Python
78,943
2,088
""" HemiCET Optimization — Experiments E4, E5, E6, E7 and Combinations Runs sequentially: E4: Self-supervised MAE pretraining → fine-tune HemiCET E5: Add midline channels (10ch instead of 8ch) E6: Multi-segment training (up to 5 segments per patient) E7: Retrain CNN+Attention frequency model on cleaned labels ...
a18fd6bcba9b5870e3a3b147fa3e7d38c1c934282d056cdefbad3a1965fa28fd
Python
79,092
1,581
# 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...
4dc978f7dda0877a180371b2fa24ac075cb54268a326a55f18af791965743626
Python
79,414
1,675
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/diffusion_gemma/modular_diffusion_gemma.py. # Do NOT edit this file manually as any edits will be overwritten by ...
b6ffd7a29866a984e68e6d53c317f9a928bc16a233edf1605bf7bb4cbe9a8b34
Python
79,935
2,403
import os import pickle import re import tempfile import unittest import backend as F import dgl import dgl.graphbolt as gb import pytest import torch import torch.multiprocessing as mp from dgl.graphbolt.base import etype_str_to_tuple from scipy import sparse as spsp from .. import gb_test_utils as gbt torch.man...
04016a8214eed65d2158fd78d955fe42df67018872096b65787901605496c0ef
Python
80,488
1,776
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/ernie4_5_vl_moe/modular_ernie4_5_vl_moe.py. # Do NOT edit this file manually as any edits will be overwritten by ...
9add9eaeab65cd8e94aba274ea7e0dfd9428bc70a9ed06733e1fd02473a8041d
Python
80,695
2,066
"""Module for converting graph from/to other object.""" from collections import defaultdict from collections.abc import Mapping import networkx as nx import numpy as np from scipy.sparse import spmatrix from . import backend as F, graph_index, heterograph_index, utils from .base import DGLError, EID, ETYPE, NID, NTY...
80de129eec4183660086222c430ba81f8656251c19f8d5ea322c93a198806ff8
Python
80,808
1,538
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/deepseek_v4/modular_deepseek_v4.py. # Do NOT edit this file manually as any edits will be overwritten by the gene...
501f5f0b91bd1d83aba3bfb8b44247c7f496e74cd18f8540afee83526253fe5c
Python
81,587
1,646
# Copyright Studio-Ouisa 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...
d74838cc269320d881cc2d2ef161e6fdb76e79732fe38453fdd009a8394d3850
Python
82,088
1,735
# 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...
fcc7d022895053541cf504e5969a0ce672635a328fa7cae5507e7f1e4c207970
Python
82,088
2,169
# python standard library imports import copy import hashlib import os.path import pickle import warnings from datetime import datetime from functools import cached_property # deal with importing collections across versions due to deprication of collections in python 3.10 try: from collections.abc import Iterable ...
098e23d959f6adacaa6eacdd49be1cd9ae52b5493e624a37ff240552f694981d
Python
82,817
2,040
# Copyright 2023 The Salesforce 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 # # U...
d4c6f591d9b4c07a5fe27afdbde925a2b6572bc1e728b5600083145805424e0d
Python
84,113
1,856
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # 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...
07f0d3805286a8438842c0bfe4edd91a3848d27c8ceee6c9cead56969a3c4cd3
Python
84,236
2,004
import imgui import numpy as np import glfw import os import copy import OpenGL.GL as gl from collections import defaultdict from os.path import join, exists, dirname from shapely.geometry import Point, Polygon from shapely.ops import unary_union, polygonize from tkinter.filedialog import askopenfilename from typing im...
6bcf3002db8f00575659e47f0ef5ff4d8a6c2b9f4fd74abf08fbe2d46357c003
Python
85,134
1,773
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/informer/modular_informer.py. # Do NOT edit this file manually as any edits will be overwritten by the generation...
1c857f22e0e63a060522166abecb772ed82d03aaa1383351e7cffe85538ebbad
Python
85,147
1,844
# Copyright 2022 Google LLC., LongT5 Authors and 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 ...
943ab4af4c4a3c6fe3d666dde453b5362e017fd809b8bfe9b2cb37fa19f6362e
Python
85,178
2,292
# Copyright 2022 Meta 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 require...
84649785ec54cfc4e1085028ecabea5bc6283d5bc6c534f8700961eaf34b1316
Python
86,218
2,755
import io import pickle import random import re from copy import deepcopy import backend as F import dgl import dgl.function as fn import dgl.nn.pytorch as nn import networkx as nx import numpy as np # For setting seed for scipy import pytest import scipy as sp import torch import torch as th from dgl import shortes...
9ced6f791538f04a69614db29f3dfc694f68872ae6cd769e20fd52886fe7efae
Python
87,665
1,903
# Copyright 2025 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...
8c0bc8f6b5bf2f910daa246bec68622c35f5e195db0d6352a8887fb21cda537f
Python
88,824
1,931
# Copyright 2022 Meta Platforms 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 # # U...
0eafcbf9d69603bb3dfa6ee5f2fdf6c34b93f79c31b84499b0a420035378a220
Python
88,825
1,808
# Copyright (c) 2021 THUML @ Tsinghua University # Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. # Copyright 2023 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 Licens...
2003efe086ccb143c96ebce5c26369809a756bb051862128ed4898370b0d2762
Python
91,417
1,756
# Copyright 2023 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 ...
8e9cea07a9bc10bcdb002ee40e9168920a57330c059d4f3b2a474984262917b4
Python
91,601
2,042
# libraries import tkinter as tk from tkinter import ttk from tkinter import messagebox from tkinter.filedialog import askopenfilename, asksaveasfilename from webbrowser import open_new import sys import os import traceback import numpy as np from scipy import ndimage import skimage.draw from skimage import filters imp...
cf316131607894c576efdd97043b9f2afd036e230c517b521081a6f75aa99e6c
Python
92,725
2,658
"""Plotting functions for AnnData.""" from __future__ import annotations from collections import OrderedDict from collections.abc import Collection, Mapping, Sequence from itertools import pairwise, product from types import NoneType from typing import TYPE_CHECKING, NamedTuple, TypedDict, cast import numpy as np im...
098b1cba1c9e13a75e2a943f0e7153b8cb014924a701360c37864796aea76f7f
Python
92,790
2,093
# Copyright Studio Ousia 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 la...
20fd93d4093e99a38cde01e91244548c1559cfc272e6927ebc2547453b4b5f87
Python
95,410
2,085
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/maskformer/modular_maskformer.py. # Do NOT edit this file manually as any edits will be overwritten by the genera...
aae5977365e26f06976b5cac28e8bfcebac660107198d8df7b60b8d2e3d96a65
Python
95,948
2,405
import os import time import numpy as np import webbrowser import pyperclip import imgui import glfw import OpenGL.GL as gl from contextlib import contextmanager from typing import List, Any, Optional, Dict, Union, Tuple from os.path import join, dirname, abspath from PIL import Image from tkinter import Tk from tkinte...
f885b1fd1513cd7f88cfaeac3ede9f3c382cfa268d932716de45c7b72916f1b8
Python
96,249
2,111
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/d_fine/modular_d_fine.py. # Do NOT edit this file manually as any edits will be overwritten by the generation of ...
0fc7817f27902aa57dc505d68fe376caab9a532f5ca49329b73d4900264206b0
Python
97,521
2,374
# 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...
04b4df17b437a5fe0a7116db895192bd1c17cc37260a77dffde5014a12f6a96b
Python
98,391
2,783
import math from random import random from beartype.typing import List, Union, Optional from beartype import beartype from tqdm.auto import tqdm from functools import partial, wraps from contextlib import contextmanager, nullcontext from pathlib import Path import torch import torch.nn.functional as F from torch.nn.pa...
0bd52183a573a9c9508480494dbd2dda1045cd4918b1c2620934cffc2b52dd57
Python
99,355
2,237
import math import random from itertools import compress from itertools import groupby from operator import itemgetter import dill as pickle from Utils.Settings import neuropixel_dataset, utils_folder from mpl_toolkits.axes_grid1.anchored_artists import AnchoredSizeBar import scipy import dill from statannotations.Anno...
aa92299fd966105ab5e62fa74dc38fa6bcd644aa28c12c253d45c690006a99ba
Python
100,948
2,104
# Copyright 2020 The Allen Institute for AI team 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 r...
bd29424bb59322149c6253cb60746802703734f8e327c3e008ec8d09f00f4997
Python
102,072
2,237
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/deimv2/modular_deimv2.py. # Do NOT edit this file manually as any edits will be overwritten by the generation of ...
bd7f0679b3fe15320f6393dcdbf88482ed7e30745e6bc338d8a24392192a45a6
Python
103,269
1,664
# Copyright 2020 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...
b9ba50d5b9c449f85c7b29633243754715e6a68c8576f9be0a9528590f2450c3
Python
103,561
1,920
# 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 ...
912636a275371401157df3defc76ff9361b5f70722985f9ccd503c84ba241da4
Python
103,783
2,372
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/glm5_next/modular_glm5_next.py. # Do NOT edit this file manually as any edits will be overwritten by the generati...
9c7067afab8a06d58daeb1a2242a83dd6fd95287d6058ef4f5bba24b2d601243
Python
105,122
2,178
# Copyright 2021 Iz Beltagy, Matthew E. Peters, Arman Cohan 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/l...
b2ad0d8f7f0576ece856425b3200a78966aea643b5ba0d172128a6f6706262eb
Python
107,699
2,379
# Copyright 2021 Google Research 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 ...
5d1e90145d97827b441aa1ed2eee6862f82b69c74cc10951102bc545a2369c29
Python
109,651
2,370
# 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...
fa51c93792e9d8f8851da1fae56635ef14b2ba1e7232012dec5cc4ab2da6ba49
Python
109,783
2,501
# 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...
977096595e4cbfadf9c35d42d0926ada5f04e9895c3d8d6c95e8ec12185ff305
Python
110,856
2,230
# 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...
eadcac146fc91201c2e510d34cc4b4272ffad3f52b09d93e4e106b1db628a45e
Python
111,239
2,790
import logging import sys import warnings import numpy as np from scipy import sparse from . import _tria_io as io from . import polygon logger = logging.getLogger(__name__) def _reduce_edges_to_path( edges: np.ndarray, start_idx: int | None = None, get_edge_idx: bool = False, ) -> list | tuple[list, l...
2576a145881158ca5ff36c614f4550018d23d14f582597d981f4384d8a4cdf51
Python
111,387
2,287
# Copyright 2026 BioHub 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 requi...
a3dafdc8395a173fccc1d7a11cf0cfccc6ea22eed98e3c3f04131ace0c6d29a3
Python
111,561
2,327
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/gemma3n/modular_gemma3n.py. # Do NOT edit this file manually as any edits will be overwritten by the generation o...
aadfdc22509cc67449a2c13b8fcdafa5bb46cee5b113950162e366b200225d63
Python
112,606
2,689
'''PyTorch backend for the slideflow.model submodule.''' import inspect import json import os import types import numpy as np import multiprocessing as mp import pandas as pd import torch import torchvision from torch import Tensor from torch.nn.functional import softmax from packaging import version from rich.progre...
508f200e3d7c185176c26fdc2b3576d6b9ddfdc296489900067cdb25653eaf8a
Python
113,038
2,645
'''Tensorflow backend for the slideflow.model submodule.''' from __future__ import absolute_import, division, print_function import atexit import inspect import json import logging import os import shutil import numpy as np import multiprocessing as mp import tensorflow as tf from packaging import version from os.pat...
879f256857634bf11be989ecc2d18f736db84e8a4b7a159b5b9680fc8099049e
Python
113,490
2,983
from __future__ import annotations import argparse import asyncio import base64 import fcntl import getpass from datetime import datetime, timezone import json import os from pathlib import Path import shlex import shutil import signal import subprocess import sys import tempfile import time from typing import Any fro...
442e7fed4f23723aaa4059fb9fb4627c596abf2ff9c0e7e1e8ce61748c210121
Python
114,336
2,355
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/esmfold2/modular_esmfold2.py. # Do NOT edit this file manually as any edits will be overwritten by the generation...
3eb09b5ab981e5256cfff6e99e97fb4b46811d0ac39126b6a5ef6160d4bb1dab
Python
114,974
2,510
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Sep 3 15:31:24 2019 @author: kai """ import numpy as np import pandas as pd import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt from rowwise_neuron_curves import * import os from scipy.stats import t, ttest_rel from matplotlib.tick...
878907aac1f46cac38a78b2ad6e38e0c4139ac51a4939d89a8960961b3dc6784
Python
115,278
2,265
############################################################################ # Copyright 2019 Google LLC # # 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 # # https://www.apache.org/l...
fec22f2ce5e8d780059c1311b675c1c7959d045509c38e8694af38d3feee986f
Python
117,531
3,130
import os import pickle import random import re import tempfile import unittest import warnings import numpy as np import pandas as pd import pydantic import pytest import torch import yaml from dgl import graphbolt as gb from dgl.graphbolt import GBWarning from .. import gb_test_utils as gbt def write_yaml_file(ya...
7e1d7f5da77efc95f11531ea2ed7270ffd4e19615c48ed44d9386229a8182988
Python
117,562
2,756
# Copyright 2018 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 ...
b731858d411dcf542d18c4eedcd1ba7ed2055934e4358143d55e54d0623c7ada
Python
117,904
2,523
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Mar 9 11:40:35 2023 @author: yatangli """ import numpy as np import math from matplotlib import pyplot as plt from matplotlib import colors from scipy.cluster.hierarchy import dendrogram, linkage import seaborn as sns import scipy import cv2 from scip...
e07397bf564a5468d63432b0998abf743d364561296b9f9fa99e735690573acd
Python
117,910
2,679
# Copyright 2020 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...
c7fbfc5fc47d93dfb1eede9e6f23f36b5c12adb8f6abc6c496b72ef499abd99f
Python
118,063
2,467
# 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...
bf5e6269ba573a541462f41f0388a50ec114299dc736f97c344cc6e3345a8fa3
Python
118,270
2,404
from abc import ABC, abstractmethod from collections import UserDict from collections.abc import Iterable import torch from .configuration_utils import PreTrainedConfig from .utils import ( is_hqq_available, is_optimum_quanto_available, is_quanto_greater, is_torch_greater_or_equal, is_torchdynamo_...
06e5fdf9499dc05db7388e5c3d67c666d501b51a45fd8c9d53dbb7b64476fdb8
Python
118,399
2,539
# 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 # ...
8a2d65700e25d458a3efe8a858347429a418b1cf03fe7d38a438b1c1bb26df62
Python
118,562
3,435
## # Copyright 2019-2021 Contributors # # 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 a...
6de023416997a090074ecf57242401994a769895eaffec9f9bb2c151fca6ab56
Python
123,284
3,673
import itertools import multiprocessing as mp import unittest from collections import Counter import backend as F import dgl import dgl.function as fn import networkx as nx import numpy as np import pytest import scipy.sparse as ssp from dgl import DGLError from scipy.sparse import rand from utils import ( assert...
e303ae7ddb470c19883b6d2db4ab98869a708addb7e74df6da807aad90eaabf4
Python
124,083
2,664
# 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...
6845c98e2d5bb0a7e50ac65e69ba36399166319a0ef99f33b11a101b8ec6153b
Python
125,971
2,697
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/gemma4/modular_gemma4.py. # Do NOT edit this file manually as any edits will be overwritten by the generation of ...
b3ec04ffdcb757379269e8084e15ea19b9e6bf8722c3e66bfd72ca1fc313c458
Python
127,160
2,597
# Copyright 2024 IDEA 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 # # Unles...
8edb76c051174948c9b0bf6591315f02d320b626a53954ba65c11ae57b39465b
Python
128,660
3,490
# Copyright 2016 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
30d2fb6413f76f1538a3f4aad2328d0dd844a86f91b1315a5990e05423e956ce
Python
129,835
2,879
from __future__ import division import os.path as op #---------------------------------- # initialize global variable config #---------------------------------- class config(object): overwrite = False scriptlist = list() joblist = list() queue = False tStam...
631ad0cfd89b6541c53f13ca593cf0507cbbd34a40c574b07b7be923f1aaef0b
Python
137,935
2,552
# Copyright (C) 2025 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 ...
731d9dddda9c87c09026d38559d784f0f2067f8e63dda6c51409937c3fd71d3b
Python
143,516
4,089
## # Copyright 2019-2021 Contributors # # 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 a...
03e60f7edcc32c5ff7d945b66b1af878c0e35b1aff2d472ee394227aa2fe7856
Python
145,545
3,513
'''This module includes tools to convolutionally section whole slide images into tiles. These tessellated tiles can be exported as PNG or JPG as raw images or stored in the binary format TFRecords, with or without augmentation.''' from __future__ import absolute_import, division, print_function import time import os...
1923afd8a23eb2575993d7870e8a7d354c9bd07df75ed5dfd698d354911d85b5
Python
147,597
4,013
# Collection of analysis functions and utilities # Specialized for Hi-C analysis import numpy as np import os import subprocess 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 import time, sleep from numpy.l...
fc17897edd9d0f447f792a06080369261174393a44d9f83e3b3f21deaa95f520
Python
148,152
3,190
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/edgetam_video/modular_edgetam_video.py. # Do NOT edit this file manually as any edits will be overwritten by the ...
e4d55dcbffafa34d5e736dda302f1c5ca8b764e144df14bde55addb806c931ed
Python
153,232
3,265
# Copyright 2024 The HuggingFace Inc. team and Google DeepMind. # # 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...
302a9f8fee933911767b12b016eba46a7d42e873a173cd81742c4b0b021c896b
Python
156,365
3,994
#!/usr/bin/env python ''' This code makes the figures for the manuscript " ''' import seaborn as sns import matplotlib.pylab as plt import numpy as np import networkx as nx import pandas as pd import matplotlib as mpl import os import sys import matplotlib.image as mpimg import matplotlib.gridspec as gridspec from glo...
1fe17f37afd59fdff5cdeba4b1c965f3d04db345ef302ec3ea604e66b622890a
Python
170,304
3,953
"""Module for the ``Project`` class and its associated functions. The ``Project`` class supervises data organization and provides a high-level API for common functionality, such as tile extraction from whole slide images, model training and evaluation, feature calculation, and heatmap generation. """ import re import ...
e7d39d1fe14d071dd8893aa179c835c9f6d4dcebe779ea96a542ba0f038d1bf8
Python
183,024
3,899
from importlib.machinery import SourcelessFileLoader from jsonschema import draft6_format_checker from networks.tpdi_layers import TPDILayer, DFCLayer, GNLayer from networks.abstract_network import AbstractNetwork import torch import torch.nn as nn import numpy as np from utils.utils import compute_batch_jacob...
89114ec2afe311e70553a847c478fb03afbc25948f9e746daf2c3b3febad8553
Python
189,198
4,525
"""Module for the ``Dataset`` class and its associated functions. The ``Dataset`` class handles management of collections of patients, clinical annotations, slides, extracted tiles, and assembly of images into torch DataLoader and tensorflow Dataset objects. The high-level overview of the structure of ``Dataset`` is a...
4f0e0ac6af55bd1cd84a19a7a932a19259f25aa6219f34d51465275dac1417ff
Python
200,000
5,415
"""Classes for heterogeneous graphs.""" import copy import itertools import numbers # pylint: disable= too-many-lines from collections import defaultdict from collections.abc import Iterable, Mapping from contextlib import contextmanager import networkx as nx import numpy as np from . import backend as F, core, grap...
fe9c0c811c3b602b0762d3e02b0b0284288cfc4aef7949e24f4d90f0f948d476
Python
200,005
3,665
# Copyright 2020 The Google AI Language Team Authors, Facebook AI Research authors and The HuggingFace Inc. team. # Copyright (c) 2020, 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 m...
bf27420c2c1134317462018ae94cc9c87ff6bbf372273edbbf3ca77a1e44e448
Python
200,010
3,845
# Copyright 2018 The Google AI Language Team Authors, Facebook AI Research 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 m...
1838f0eecfa12757346489a588e7a15b765e21f95b14e8fa17d6d585dac5eddd
R
50
4
library(testthat) library(SKM) test_check("SKM")
cb48d5d11955f9f40f534523c1af7987500143b611219097c810318a3bcff638
R
64
4
library(testthat) library(geneBasisR) test_check("geneBasisR")
fd0fd576e41a1af6724cff5ad856b6dd8be53aa18f89e5c7a72244c312183038
R
166
8
#Install QuaSAR Packages a<-installed.packages() packages<-a[,1] if (!is.element("qcc",packages)){ install.packages("qcc" , repos='http://cran.us.r-project.org') }
f6c5564c3d160fa30a3a34fb465edf44e39a1baea11aa1b17abc1ae11480ac6f
R
173
3
#' @param x (`matrix`) The predictor (independet) variable(s). It must be a #' numeric matrix. You can use [to_matrix()] function to convert your data to #' a `matrix`.
c8f5e4fb27208c599fac697501471fe8042de82e95d1510f6086e4bb640c1a2c
R
204
4
#' @details #' All records with missing values (`NA`), either in `x` or in `y` will be #' removed. The positions of the removed records are returned in the #' `removed_rows` field of the returned object.
c31f46015ec95e9a916b32b39115c81d390764ea56d33d451f6d69d14a046eef
R
236
4
#' @details #' You have to consider that before tuning all columns without variance #' (where all the records has the same value) are removed. Such columns #' positions are returned in the `removed_x_cols` field of the returned object.
da79c10911ed6020c2fec47053c9149da8d5f31241e7d03a096eebdaed0a3797
R
263
17
# Import of the bibliography insert_head() # container ------- bib <- list() # reading the BibTex ------ insert_msg('Reading the BibTex') bib <- read_bib('./paper/markdown/pah_biblio.bib') # END ------ insert_tail()
71b2a33daaf4b171918e5144c3f1ecebc12c23379a07c21ee0496656c49bd923
R
280
22
data(Maize) folds <- cv_kfold(nrow(Maize$Pheno), k = 5) results <- gs_bayesian( Maize$Pheno, Maize$Geno, traits = "Y", folds = folds, is_multitrait = FALSE, iterations_number = 10, burn_in = 5, thinning = 5, seed = NULL, verbose = TRUE ) print(results)
c3df2b378c415caf39235485257ab77b6ade56f3ea04594d4c354932cd367cac
R
284
6
source("../MSstatsExternalTool.R") inputFile <- normalizePath("Human_plasma.csv") outputdir <- file.path(getwd(), "TestResult"); outputdir <- paste(outputdir, "/", sep="") dir.create(outputdir, showWarnings = FALSE) QualityControl(inputFile, FALSE, "all", 100, 200, address=outputdir)
107b728b427fd2b163e9542d604aea300e29fac88e85862758198d197dabfa87
R
301
6
source("../MSstatsExternalTool.R") inputFile <- normalizePath("Human_plasma.csv") outputdir <- file.path(getwd(), "TestResult"); outputdir <- paste(outputdir, "/", sep="") dir.create(outputdir, showWarnings=FALSE) MsStatsExternalTool(c("GC", "--dataFileName", inputFile, "--outputFolder", outputdir))
1d80a4af73a1e4314e09b38f4ec2665633a000b7f729adaffa53aa37a3fb8de2
R
303
6
source("../MSstatsExternalTool.R") inputFile <- normalizePath("ThreeMolecules.csv") outputdir <- file.path(getwd(), "TestResult"); outputdir <- paste(outputdir, "/", sep="") dir.create(outputdir, showWarnings=FALSE) MsStatsExternalTool(c("GC", "--dataFileName", inputFile, "--outputFolder", outputdir))
2bd168472b030ba65c83c4f20c8120d359178062d489a72b378a79b5437aade8
R
318
14
#' Computes the coefficient of variation of a numeric vector #' #' @param x input numeric vector #' #' @return A numeric value of the relative standard deviation #' @export #' #' @examples #' calc_cv(1:10) calc_cv <- function(x){ # compute relative standard deviation stats::sd(x, na.rm = T)/mean(x, na.rm = T) }
4cef2501fdd65c5840472ead8accc87c6c48bdb94b6b8aba86600b5151c80296
R
322
16
data1 <- read.table('matchedGWAS.celltype_asso.txt', header=T) orderedDF <- data1[order(data1$log2Enrich, decreasing=T), ] print(orderedDF) pdf('Plots/matchedGWAS.celltype_asso.bar.pdf') barplot(orderedDF$log2Enrich, names.arg=orderedDF$CellType, las=2, ylab='Log2 enrichment of matched PD GWAS-SNPs') dev.off() ...
6c33003dc299db377e6a66e06b66022f7e83b7f25d4a360f8b07151c43c5bd92
R
336
6
source("../MSstatsExternalTool.R") inputFile <- normalizePath("Rat_plasma.csv") outputdir <- file.path(getwd(), "TestResult"); outputdir <- paste(outputdir, "/", sep="") dir.create(outputdir, showWarnings=FALSE) MsStatsExternalTool(c("GC", "--dataFileName", inputFile, "--normalization", "globalStandards","--outputFolde...
95acd5fdced8b3b79fc845df58338ea024e75efe3fa743117dc6b23d0b0ddffb
R
354
15
# This program executes the scripts of the PAH biomarker project # libraries ----- library(soucer) # listing figure scripts ---- print(source_all(c('import.R', 'exploration.R', 'analysis.R', 'paper.R'), message = T...