sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
2db50c5b9923cb2864e85eb87a79f1a58d57a3a575750cee0ad9d74e057005ec | Python | 65,434 | 1,654 | import datetime
import json
import logging
import os
import re
import secrets
import shutil
import signal
import tempfile
import threading
import time
import traceback
from collections import OrderedDict
from threading import Thread
import cv2
from ethoscope.core.monitor import Monitor
from ethoscope.drawers.drawers ... |
61b9274a9382403d889b4fd6588cedec632e951dfc48bb69fbd92f457092af2c | Python | 65,496 | 1,399 | """
Galaxy job handler, prepares, runs, tracks, and finishes Galaxy jobs
"""
import abc
import datetime
import os
from collections import defaultdict
from queue import (
Empty,
Queue,
)
from typing import (
Any,
Optional,
TYPE_CHECKING,
)
from sqlalchemy.exc import OperationalError
from sqlalchemy... |
bd7a466f89cdfcec481632c1aa88737c2ac898e84ab3da9853cc60269153400a | Python | 65,546 | 1,726 | """
sess_plot_util.py
This module contains basic functions for plotting with pyplot data generated by
the Allen Institute OpenScope experiments for the Credit Assignment Project.
Authors: Colleen Gillon
Date: October, 2018
Note: this code uses python 3.7.
"""
import copy
from pathlib import Path
import itertool... |
372b4d980022f23520c7b45253fe11d08c2d8b3e0120d0c0cc9a4e392eeaaea0 | Python | 65,606 | 1,739 | # --- THIS FILE IS AUTO-GENERATED ---
# Modifications will be overwitten the next time code generation run.
from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Scatter3d(_BaseTraceType):
_parent_path_str = ""
_path_str = "scatter3d"
_valid_props =... |
baf7eab95ca75ecff9424dc568c18fa724a28642cff7122a7f6a27869db3c50d | Python | 65,626 | 1,748 | import datetime
import glob
import json
import logging
import os
import pprint
import re
import shutil
import sys
import time
import warnings
from multiprocessing import Pool, cpu_count
import numpy as np
import tifffile as tf
from parse import parse as _parse
from llspy.libcudawrapper import affineGPU, deskewGPU, qu... |
c6772b2baee5f7fc1df11e77d7164f0c85c316834eab5ea0c28435ef8df58c83 | Python | 65,806 | 2,106 | # coding=utf-8
# Copyright 2025 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
a1b3a9033d577e563c49af3bc9832fd2e5cc3f949e69fd4ab8edb2efb49ab2c2 | Python | 65,813 | 1,857 | """Reproducible simulation manifests and filesystem-backed discovery.
The module intentionally has no eager imports of simulation launchers. This
keeps it safe to use from all five run implementations and avoids circular
imports while Larvaworld's registry is being initialized.
"""
from __future__ import annotations... |
8e8240aa921b67430164eda65ef1d0abc4a3d2e5622ba69e8a3e5b9c77afb487 | Python | 65,941 | 1,937 | import os
import pysam
import pytest
import json
import collections
import struct
import copy
import array
from pysam import CDEL, CDIFF, CEQUAL, CINS, CMATCH, CPAD, CREF_SKIP, CSOFT_CLIP
from TestUtils import (
dict_of_read,
make_data_files,
BAM_DATADIR,
)
def setUpModule():
make_data_files(BAM_DATA... |
4262bee9950be18d6c95bb85d53109c0342b3408332853ec02f62d3e072bdebb | Python | 66,059 | 1,665 | """Tests for the TorchLens 2.0 exception taxonomy."""
from __future__ import annotations
import ast
import builtins
import importlib
import pickle
from collections.abc import Callable
from pathlib import Path
from typing import Any
import pytest
from _source_corpus import package_ast, package_files
from torchlens i... |
94d2456bea3c2d9c8044ccc22ff8a7f8d1d10c6c8ab8782b25d5dacce2f39cdc | Python | 66,070 | 1,528 | import random
import networkx
import numpy as np
import scipy.sparse as sp
import torch
from anndata import AnnData
try:
from typing import Any, Dict, List, Literal, Optional, Tuple, Union
except ImportError:
from typing_extensions import Literal
from typing import List, Optional, Tuple, Union
from spateo.a... |
b1a4b5d61f9319c19e70eb88acf02e1ff443db2282672a45b42283dfadf1b407 | Python | 66,168 | 1,734 | """
TODO:
- ability to cancel running stardist computation
- run only on field of view (needs testing)
- https://forum.image.sc/t/how-could-i-get-the-viewed-coordinates/49709
- https://napari.zulipchat.com/#narrow/stream/212875-general/topic/corner.20pixels.20and.20dims.20displayed
- https://github.com/napari/nap... |
7f8125b27c6b9e845b7968fc63029d2a8873b06bbd1e93f5bcb201cc04287d1a | Python | 66,215 | 1,616 | import sys
import time
from contextlib import contextmanager
from datetime import datetime, timedelta, timezone
from pickle import dumps, loads
from unittest import TestCase
from unittest.mock import Mock
import pytest
from dateutil import tz as dateutil_tz
from freezegun import freeze_time
from celery.exceptions imp... |
950fb647db6cac531d893b079c7491c39f4e20f22d2d5a448c4339314d71ce7c | Python | 66,285 | 1,826 | """Tests for the R3a v2 collapse optimizer."""
from __future__ import annotations
import multiprocessing
import os
import queue
import random
import time
from collections.abc import Callable, Iterator, Mapping
from pathlib import Path
from types import ModuleType, SimpleNamespace
from typing import Any
import pytest... |
8b1af8f57f4fa5965c9aa82cb0c3c14c8f2e9eea71609cd995bbf54db9b123b6 | Python | 66,438 | 1,716 | #!/usr/bin/env python
"""Generate plots using flexynesis
This script generates dimensionality reduction plots, Kaplan-Meier survival curves,
and Cox proportional hazards models from data processed by flexynesis."""
import argparse
import os
from pathlib import Path
import matplotlib.pyplot as plt
import numpy as np
i... |
cb6ad6d3e6b789588bef119cc280994ad35aaac5c51d8f114469c6a20430584b | Python | 66,507 | 1,770 | # --- THIS FILE IS AUTO-GENERATED ---
# Modifications will be overwitten the next time code generation run.
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class AngularAxis(_BaseLayoutHierarchyType):
_parent_path_str = "layout.polar"
... |
841549405efb07625e1b423975cd4abc67a9b1635000ce1b87d30ec5a4e94a8e | Python | 66,733 | 1,569 | """Tigramite data processing functions."""
# Authors: Jakob Runge <jakob@jakob-runge.com>
# Andreas Gerhardus <andreas.gerhardus@dlr.de>
# License: GNU General Public License v3.0
from __future__ import print_function
from collections import defaultdict, OrderedDict
import sys
import warnings
from copy impor... |
553eeb36bc46e3462a175770864c5358be064dec1f557c42221a51a1334aafb4 | Python | 66,856 | 1,455 | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... |
cfadc1b3394c28a5be85093659b8c73b3c9578ec6ba5d6b580d3cf735fa65c7d | Python | 66,858 | 1,638 | """Utilities defining "Galaxy Flavored Markdown".
This is an extension of markdown designed to allow rendering Galaxy object
references.
The core "Galaxy Flavored Markdown" format should just reference objects
by encoded IDs - but preprocessing should allow for instance workflow objects
to be referenced relative to t... |
ac3a4400c3750e709bb883ecb746227a4bc8cdc8bd5102b0af99b5be9e73e64c | Python | 67,008 | 1,735 | # --- THIS FILE IS AUTO-GENERATED ---
# Modifications will be overwitten the next time code generation run.
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Annotation(_BaseLayoutHierarchyType):
_parent_path_str = "layout"
_path... |
162cc62d37bc9fc53bee377a8a7f72d72369ced647aef9af4c98f5e192af4aca | Python | 67,444 | 1,628 | """
Setup API Module
Handles installation wizard and first-time setup functionality.
"""
import os
import time
from pathlib import Path
import bottle
from ethoscope_node.utils.etho_db import ExperimentalDB
from .base import BaseAPI, error_decorator
# Statuses indicating a device is actively running an experiment.... |
4423981cb700e8289eb24210289fed26ce4063b5caa9a676702d4da076e62aed | Python | 67,668 | 702 | # -*- coding: utf-8 -*-
"""Собрать многоязычную страницу «о проекте» (about.html).
Один HTML-шаблон блока + словари переводов на 4 языка (EN по умолчанию,
плюс RU, DE, ZH). Переключатель языка вверху справа, выбор запоминается в
localStorage и общий с страницей симуляции. Значения словаря могут содержать
инлайновый HT... |
80cb6bfb436160d73b7214529f94d28b7333c98dff75a53d20552eb33645fea2 | Python | 67,705 | 1,346 | # Copyright (c) 2025, Jay Shah, Ganesh Bikshandi, Ying Zhang, Vijay Thakkar, Pradeep Ramani, Tri Dao.
# A reimplementation of https://github.com/Dao-AILab/flash-attention/blob/main/hopper/mainloop_bwd_sm80.hpp
# from Cutlass C++ to Cute-DSL.
import math
from types import SimpleNamespace
from typing import Type, Callabl... |
7aa83b45da812d20cdde46e8a84ec7919c6fa222197965f924496d4594f76150 | Python | 67,780 | 1,686 | from __future__ import annotations
import collections.abc as cabc
import inspect
import os
import sys
import typing as t
import weakref
from datetime import timedelta
from functools import update_wrapper
from inspect import iscoroutinefunction
from itertools import chain
from types import TracebackType
from urllib.par... |
5766df5e82663572bee92e1500384ec9355d7f9273364b97ab2a490b621dc57d | Python | 67,857 | 2,086 | import builtins
import inspect
import math
import jax
import jax.experimental.sparse as jax_sparse
import jax.numpy as jnp
from absl import logging
from jax import lax
from jax import nn as jnn
from jax.experimental.pallas.ops.tpu.splash_attention import (
splash_attention_kernel,
)
from jax.experimental.pallas.op... |
3ad5ce08642b41b20a47f677b18ba6a63ce5bf4a486a86446aaa0d42edd9fe0d | Python | 68,001 | 1,759 | #!/usr/bin/env python
import argparse
import binascii
import copy
import datetime
import json
import logging
import os
import re
import shutil
import ssl
import string
import struct
import subprocess
import urllib.request
import xml.etree.ElementTree as ET
from collections import defaultdict
logging.basicConfig(level... |
56b467bc66e19730aad2de5626835b1cb2e3f3507a45910a433e2562198c4759 | Python | 68,036 | 1,727 | # -*- coding: utf-8 -*-
'''
PYSIMPLEGUI BASED GUI FOR VORONOI CLUSTERING OF MOLECULAR TRAJECTORY DATA
Design and code: Tristan Wallis
Debugging: Sophie Huiyi Hou
Queensland Brain Institute
University of Queensland
Fred Meunier: f.meunier@uq.edu.au
REQUIRED:
Python 3.8 or greater
python -m pip install scip... |
c9434c9f70b6f575a0ca4cd7a7edf3f0dff8525d09445366cb7946343233650f | Python | 68,114 | 1,597 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import numpy as np
import pandas as pd
import argparse
import os
import sys
import pwd
import pdb
import csv
import re
import math
import matplotlib.pyplot as plt
import ... |
c15472f79d849e60a0755ef3ee33f08d7d352f1353ad4a041942e803c14bd611 | Python | 68,150 | 1,288 | # 2022/2023 Josue Page Vizcaino pv.josue@gmail.com
# Third party libraries imports
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision as tv
from torch.utils import data
from torch.utils.tensorboard import SummaryW... |
09d4c956e8bffd019333cf70b12025265b5fcee19361348692d0d2d67579d6e4 | Python | 68,204 | 1,662 | from collections.abc import (
Callable,
Iterable,
)
from dataclasses import dataclass
from datetime import timedelta
from pathlib import Path
from types import SimpleNamespace
from typing import (
cast,
Optional,
TYPE_CHECKING,
)
from uuid import UUID
from sqlalchemy import (
delete,
exists... |
815da10829eea2fe39cbbb9fcc8f7168730821f605a2d9846eaca566aaa3cb80 | Python | 68,255 | 1,248 | #####train scGNN
import argparse
import datetime
import os
import os.path
import pickle
import pickle as pkl
import sys
sys.path.append('../pkgs/scGNN/')
import time
import networkx as nx
import numpy as np
import pandas as pd
import scipy.io
import scipy.sparse as sp
import torch
from benchmark_util import *
from gae... |
ec2e66460a0629e752a0a75dc4a09c587f7c0a7110922b36ebdf4e02dbc0a0c4 | Python | 68,277 | 1,751 | # Author: Christian Brodbeck <christianbrodbeck@nyu.edu>
from dataclasses import dataclass
from enum import Enum
from functools import partial, reduce
from itertools import product
from numbers import Number
import operator
from typing import Any, Literal, Sequence, Union
import matplotlib
import mne
from nibabel.free... |
19b7cb423b3bd741b9ed7df53f94637bb1dd6d1117777221525827ede8c51b41 | Python | 68,297 | 1,600 | """Explicit guarded fast paths for repeated static-model execution."""
from __future__ import annotations
import threading
import weakref
from collections.abc import Callable, Mapping
from contextlib import contextmanager, nullcontext
from dataclasses import dataclass
from typing import Any, cast
import torch
from t... |
e54fa9996b763c82d5270810a2cc085878d8221a1563f3026a9aad083fea0ccd | Python | 68,326 | 1,948 | """
Comprehensive unit tests for ethoscope_node.utils.etho_db module.
This module tests the ExperimentalDB class and all its database operations including:
- Database initialization and table creation
- SQL execution with error handling
- User CRUD operations
- Incubator CRUD operations
- Device management
- Run/exper... |
fbe26b1e836d278eb917b6810156b784b85cae8f6a41cab882ad2e01fab203a6 | Python | 68,423 | 2,152 | """Tests of N-dimensional tuning curves for `pynapple` package."""
from contextlib import nullcontext as does_not_raise
import numpy as np
import pandas as pd
import pytest
import xarray as xr
import pynapple as nap
def get_group_n(n):
return nap.TsGroup(
{i + 1: nap.Ts(t=np.arange(0, 100, 10 ** (i - 1... |
6a04a601e152018f1f7bf63aaf908a3fd038ed06aca22ad0ddcfcbf00b638fa0 | Python | 68,441 | 2,072 | import functools
import math
import warnings
import tensorflow as tf
from keras.src import backend
from keras.src.backend.common import dtypes
from keras.src.backend.common import is_float_dtype
from keras.src.backend.common import standardize_dtype
from keras.src.backend.common.backend_utils import canonicalize_axis... |
b81c86111a2029be595a78fbfc549104bf6504c4442f3111b07a61b0c27ef322 | Python | 68,474 | 2,066 | """
Custom ``param`` types used throughout the package.
Provides the constrained numeric, phase, range and selector parameters that
express the domain's own semantics -- positive quantities, angular phases,
dataframes and unit-carrying values -- so that validation and serialization
live with the type rather than at ea... |
93473462c06c50ea517b64e8b47915cd0a5d7f255585fb2f858b1dc34930df66 | Python | 68,611 | 1,822 |
# Version: 0.18
"""The Versioneer - like a rocketeer, but for versions.
The Versioneer
==============
* like a rocketeer, but for versions!
* https://github.com/warner/python-versioneer
* Brian Warner
* License: Public Domain
* Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, 3.5, 3.6, and pypy
* [![Latest Version]
... |
68447dac4ed393d00896e327871bb9c2f202c5bfc8cc98cda09aa81723606553 | Python | 68,739 | 1,720 | import contextlib
import hashlib
import http.client
import io
import itertools
import json
import logging
import os
import shutil
import time
import warnings
import zlib
from datetime import datetime, timezone
from urllib.error import HTTPError, URLError
import geopandas as gpd
import pandas as pd
import pytest
from p... |
a056580d214a430459e65a585d1e2c5bdc9baaa020daf0b82e005ebc42a6825b | Python | 68,742 | 1,825 |
# Version: 0.18
"""The Versioneer - like a rocketeer, but for versions.
The Versioneer
==============
* like a rocketeer, but for versions!
* https://github.com/warner/python-versioneer
* Brian Warner
* License: Public Domain
* Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, 3.5, 3.6, and pypy
* [![Latest Version]
... |
20edf7719e069d2981a906b76ae4e2f7e22224e58fa251b0d929dee9a5176a48 | Python | 68,926 | 1,684 | import fnmatch
import gc
import inspect
import os
import random
import re
import sys
import time
import weakref
from collections.abc import Iterator
from contextlib import contextmanager
from os.path import join as opj
from pathlib import Path
from types import ModuleType
from typing import Any
import numpy as np
impo... |
16ffb6c9b5d1ec765dff0192898cdc219fbb2627609c31cc99b03464ac72c494 | Python | 69,339 | 1,664 | from __future__ import annotations
import importlib
import json
from pathlib import Path
from types import SimpleNamespace
import larvaworld
import pandas as pd
import panel as pn
import pytest
from larvaworld.lib import reg, util
from larvaworld.lib.model import moduleDB as MD
from larvaworld.lib.reg import config ... |
84008a76ad5b09a105f4b48dcc5e325d5eae8f02d21145785b2c623f4d16b12c | Python | 69,640 | 1,931 | """Comprehensive metadata field testing for Trace and Op.
Uses small/fast models from example_models.py to verify that all key metadata
fields are populated correctly across different model types.
"""
import copy
import linecache
import pickle
import example_models
import pytest
import torch
import torch.nn as nn
i... |
1827305a8f5559ce6893f659880b87f0ca976adc987dfe68b367774f50bb72f1 | Python | 69,916 | 1,332 | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
2271286518bd8a6f6b1fddfcdc55176d0d363121950adfe77fdc22b8cc7b0be4 | Python | 70,017 | 2,135 | """PYTEST_DONT_REWRITE
Phase 8 integration matrix for conditional branch attribution.
"""
from __future__ import annotations
import linecache
import pickle
import sys
import tempfile
from collections.abc import Callable, Sequence
from dataclasses import replace
import pytest
import torch
import torch.nn as nn
pd =... |
e09517245677fac97fa33650b170bada4bb06761ec4cda58596c0752f90d89c3 | Python | 70,152 | 1,863 | # Version: 0.19
"""The Versioneer - like a rocketeer, but for versions.
The Versioneer
==============
* like a rocketeer, but for versions!
* https://github.com/python-versioneer/python-versioneer
* Brian Warner
* License: Public Domain
* Compatible with: Python 3.6, 3.7, 3.8, 3.9 and pypy3
* [![Latest Version][pypi... |
1d98fecbbd726099c455599809d0f67dfec826f48e65d3c35e2affb49229204e | Python | 70,345 | 1,948 | # code adapted from https://github.com/aristoteleo/dynamo-release/blob/master/dynamo/plot/utils.py
import copy
import math
import os
import warnings
from inspect import signature
from typing import Any, Collection, Dict, List, Optional, Tuple, Union
with warnings.catch_warnings():
warnings.simplefilter("ignore")
... |
39005a497bce97481ce787d3771ed2f7b35e4fef6835d0fefeed9f0f7d9f1697 | Python | 70,401 | 1,881 | # --- THIS FILE IS AUTO-GENERATED ---
# Modifications will be overwitten the next time code generation run.
from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Isosurface(_BaseTraceType):
_parent_path_str = ""
_path_str = "isosurface"
_valid_props... |
11c20eea756595e1d018d61ff82475ac4ce68f491edd299feaf5fab0f9553d50 | Python | 70,410 | 1,857 | # --- THIS FILE IS AUTO-GENERATED ---
# Modifications will be overwitten the next time code generation run.
from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Surface(_BaseTraceType):
_parent_path_str = ""
_path_str = "surface"
_valid_props = {
... |
1d1a2493a950a19fb519b45b5c3bbe17e3666d5932043bcf88d27e070d4f6fc7 | Python | 70,650 | 1,550 | """Job runner used to execute Galaxy jobs through Pulsar.
More information on Pulsar can be found at https://pulsar.readthedocs.io/ .
"""
import copy
import errno
import logging
import os
import re
import subprocess
from dataclasses import dataclass
from time import sleep
from typing import (
Any,
Optional,
... |
7d77df93114a02b63d29c4fcb2f4faf3b5132f36b39afe76239f7977fb7ba453 | Python | 70,667 | 1,731 | import ast
import itertools
import random
from ast import literal_eval as leval
from copy import deepcopy
from typing import List, Union
import numpy as np
import pandas as pd
from casadi.casadi import ceil, floor
from rdkit import Chem, RDLogger, rdBase
from rdkit.Chem import AllChem, Descriptors
from tqdm import tqd... |
3345f8778e2863af86e7569680f15862b05835dcc81a9afaf4e564fb3ef76a96 | Python | 70,751 | 1,433 | # Asteroid Impact (c) Media Neuroscience Lab, Rene Weber
# Authored by Nick Winters
#
# Asteroid Impact is licensed under a
# Creative Commons Attribution-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-... |
f52bcf55406ff3e0d5fd895f0e630acea7f4619be3ee20db193a3ec6646c96cd | Python | 70,765 | 1,822 | """Actual App instance implementation."""
import functools
import importlib
import inspect
import os
import sys
import threading
import types
import typing
import warnings
from collections import UserDict, defaultdict, deque
from collections.abc import Mapping
from datetime import datetime
from datetime import timezone... |
bb20b6f72d8be401402c4c22723811d4318b9d168046f5d179c7ed2603978f9d | Python | 70,931 | 1,437 | # Asteroid Impact (c) Media Neuroscience Lab, Rene Weber
# Authored by Nick Winters
#
# Asteroid Impact is licensed under a
# Creative Commons Attribution-ShareAlike 4.0 International License.
#
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-... |
d532477bc18c660315c6fc9d9b7142d0d25794f18547890a791e1f29d3a46c28 | Python | 71,013 | 2,000 | """Load-boundary validation for persisted cross-record claim families.
The fields in this module are ordinary Python objects after restricted
unpickling, but their values remain hostile artifact input. Validation here
therefore uses closed vocabularies and independently persisted structural
anchors before a rehydrate... |
bb6ef8f716e2ab6288c2756a85e04fdcfadde930e65cda64f191dc797f44f968 | Python | 71,024 | 1,592 | """Tigramite causal inference for time series."""
# Authors: Martin Rabel, Jakob Runge <jakob@jakob-runge.com>
#
# License: GNU General Public License v3.0
import numpy as np
from sklearn.neighbors import KNeighborsRegressor, KernelDensity
from functools import partial
import tigramite.toymodels.non_additive as toy_s... |
889f3e28da5b254bd0b692ba58a85e9282ff5e42bcd466fb53f5afe5a71fccd1 | Python | 71,107 | 1,886 | # --- THIS FILE IS AUTO-GENERATED ---
# Modifications will be overwitten the next time code generation run.
from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Streamtube(_BaseTraceType):
_parent_path_str = ""
_path_str = "streamtube"
_valid_props... |
38173ae868ea64693fd204293031b58e56e48a66d1870dae01cca2c8360ca4c6 | Python | 71,129 | 1,474 | # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
from __future__ import annotations
import contextlib
import math
import weakref
from collections.abc import Callable
from pathlib import Path
from typing import Any
import cv2
import numpy as np
import torch
from PIL import Image, ImageDraw, ImageFo... |
87b1583ed5f41e65b0f2ff3bbdabb1c432eaf4b364e1fffdcb6ae7a28f5051bf | Python | 71,519 | 1,896 | """GUI for rejecting epochs
File format
-----------
Required variables:
- ``trigger`` :class:`Var` (int)
- ``accept`` :class:`Var` (boolean)
- ``rej_tag`` :class:`Factor`
Optional:
- ``interpolate_channels`` :class:`Datalist` (lists)
"""
# Author: Christian Brodbeck <christianbrodbeck@nyu.edu>
# Document: ... |
88144cdc4861c3af71771904235171aa0094faaabdf54afacbf325c8206e9d6b | Python | 71,672 | 1,949 | # SPDX-License-Identifier: LGPL-2.1-or-later
#!/usr/bin/env python
# encoding: utf-8
import os
import unittest
import random
import time
import calendar
from collections import OrderedDict
import numpy as np
from pyEcoHAB.utils import general as uf
from pyEcoHAB import data_path
from pyEcoHAB import Loader
from pyEcoH... |
8dd7822f5bb5e6001f6f8fe48a177a70d7e94aa1b5e2f2b8946eea6fe4834865 | Python | 72,095 | 1,712 | """Find and download the OSM extract(s) for an area: the smallest single extract that
contains it, or a smaller set of extracts merged into one file.
Public entry points: :func:`find_extracts` lists the candidates, :func:`get_data_by_area`
downloads the best one. Candidates come from three providers:
- Geofabrik, fro... |
21b78da1c304a2d4daf7dd8b2c9fb07103e21c2df398f8182342536d8e3c88aa | Python | 72,271 | 1,664 | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
f0ed9697e5d5ad3326d8d32b7b4dab2aa2af7c56e6f642d4de11f3175f93c896 | Python | 72,393 | 1,958 | """
Block-sparse runtime utilities for CUTE DSL kernels.
This module contains runtime execution functions for block-sparse attention kernels.
These utilities are used by CUTE DSL kernels to produce and consume block-sparse loads.
"""
from typing import Callable, Optional, Tuple
from functools import partial
import cu... |
8949cd10994a2fb115804b763492f8b15f47030a038c3243770764cf0ffcf685 | Python | 72,413 | 1,118 |
__author__ = 'Aaron Gudmundson'
__email__ = 'agudmund@uci.edu'
__date__ = '2020/12/05'
__version__ = '10.0.0'
__status__ = 'beta'
from scipy.optimize import curve_fit, minimize # Optimization
import matplotlib.patches as mpatches ... |
9e0e996d4d1d07b008c2951c3f965299c837a48186efab2c98c69dee3baf2836 | Python | 72,495 | 1,723 | import os
import umap
import gc
import glob
import itertools
import matplotlib
import numpy as np
import pandas as pd
from tqdm import tqdm
from textwrap import wrap
from joblib import dump, load
from itertools import combinations
from joblib import Parallel, delayed
import matplotlib
import seaborn as sns
import matp... |
e12a7d733738b981eff2f3e89a8e8f8b83833e813850d7f52601d0dcc1503cbc | Python | 72,498 | 1,931 | # --- THIS FILE IS AUTO-GENERATED ---
# Modifications will be overwitten the next time code generation run.
from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Volume(_BaseTraceType):
_parent_path_str = ""
_path_str = "volume"
_valid_props = {
... |
112ce3522367a86b8982b9a145c9e006f61a0e98868fdd67a8f4f36e54a18453 | Python | 72,511 | 1,628 | """utils.py
Miscellaneous dumping ground. Buyer beware.
Copyright (C) 2018-2026 Max Planck Institute for Neurobiology of Behavior
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of... |
0a392d7fe1f02e47c43dc8ae7a070c6693e30aa6c74f8914aef7acae3b8741d4 | Python | 72,535 | 1,726 | """Round-26 W3 validation-tripwire hardening tests.
The round-26 meta-audit proved the validation tripwire BLESSED three real
capture-bug classes (false negatives) and wrongly FAILED two correct-model
spellings (false positives). Each false-negative test here is a mutation
proof: it constructs the exact bug class on a... |
d704600d10e87ac9dc3cf154fd946412918919cd3eb9352fc9ae9032612207d2 | Python | 72,651 | 1,895 | """Round-39 coupled witness/execution hardening -- pinned regression + immunizer suite.
Two meta-classes closed structurally (see round39-plan/PLAN_AGREED.md):
* CLASS A -- enumeration completeness (RNG/clock + tensor->host escape). A negative
witness (``host_rng_consumed=False`` / ``COMPLETE``) is honest only if e... |
4ece387a3ee55d66dd984654ecf7d8189823764c85a58d266832cdc0e48626d9 | Python | 72,706 | 1,620 | from itertools import combinations
from abc import ABCMeta, abstractmethod
from skmob.utils import constants
from skmob.core.trajectorydataframe import TrajDataFrame
from tqdm import tqdm
import pandas as pd
from ..utils.utils import frequency_vector, probability_vector, date_time_precision
class Attack(object):
... |
9b13554b6e4c322529385f45b70195de19114a8be4a9691f18972298213eb2ac | Python | 72,716 | 1,909 | # -*- coding: utf-8 -*-
"""
Updated June 7 2023
@author: Bethanny Danskin
"""
import numpy as np
import pickle
import random
import xarray as xr
import pandas as pd
import warnings
# Load optimizers
import statsmodels.api as sm
from scipy import stats
from scipy.optimize import minimize, basinhopping
from sklearn.mode... |
aa190d877b337a5815ed65060b49d5214be3650a8d16fa871447abdc972d2eea | Python | 72,770 | 2,345 | import argparse
import math
import os
import random
import re
import subprocess
import sys
import time
import types
import numpy
# from argparse import RawTextHelpFormatter
#####################
# FUNCTIONS
def print2file(f, i, m):
"""
print content i to file f in mode m
"""
line = str(i)
if m ... |
49c0f3f59f0e63fe9d8ccd4b35be1583e66d9a6d577107dd08d9d5aca6eba7c1 | Python | 72,816 | 1,614 | """PyTorch ResNet
This started as a copy of https://github.com/pytorch/vision 'resnet.py' (BSD-3-Clause) with
additional dropout and dynamic global avg/max pool.
ResNeXt, SE-ResNeXt, SENet, and MXNet Gluon stem/downsample variants, tiered stems added by Ross Wightman
Copyright 2019, Ross Wightman
"""
import math
fro... |
d3452af29470b5e02c7188b33fc80ba773508d20305b0cb49d26e283963632a8 | Python | 72,868 | 2,399 | #!/usr/bin/env python
# coding=utf8
"""Processing toolbox methods.
This module contains the processing methods.
"""
import functools
import logging
import re
import sys
import numpy as np
import scipy as sp
from scipy import signal
from sklearn.covariance import LedoitWolf as LW
from wyrm.misc import deprecate... |
9a0d547492221a44fd7cf74dd0b7c38dc41ccec33bd69c12da2c5955a9af2012 | Python | 72,922 | 2,016 | """Python-based idempotent model-saving functionality."""
import datetime
import io
import json
import math
import os
import pathlib
import shutil
import tempfile
import warnings
import zipfile
import ml_dtypes
import numpy as np
from keras.src import backend
from keras.src.backend.common import global_state
from ke... |
9ac5e806cf0cc80b1b5bc2dec6414afc3a31fa380d173f1cae09e0f36b933daa | Python | 73,162 | 1,795 | import argparse
import collections
import copy
import json
import logging
import math
import os
import re
import sys
from functools import reduce
from typing import (
TYPE_CHECKING,
)
import numpy as np
import yaml
from galaxy.util import parse_xml
if TYPE_CHECKING:
from galaxy.model import (
Dataset... |
c6da4474257654e9889c4ed33e1e0f9afa841c7ce2c1fe537ba437b1ed93829a | Python | 73,290 | 1,633 | # Copyright (c) 2025, Jay Shah, Ganesh Bikshandi, Ying Zhang, Vijay Thakkar, Pradeep Ramani, Tri Dao.
# SM90 (Hopper) forward pass for flash attention, extracted from flash_fwd.py.
from types import SimpleNamespace
from typing import Callable, Literal, Optional
from functools import partial
import cuda.bindings.drive... |
71ffbfbd538badf66e9fb9a7e1a3c4101513d79c831b8a272a3828f45059ddd8 | Python | 73,300 | 1,926 | # --- THIS FILE IS AUTO-GENERATED ---
# Modifications will be overwitten the next time code generation run.
from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Cone(_BaseTraceType):
_parent_path_str = ""
_path_str = "cone"
_valid_props = {
... |
5a1d8217a47ef720b76870071b0c22a55e0a4e0173a589c5398f6c4636e40c4c | Python | 73,476 | 1,955 | """Backend-neutral payload codecs for portable bundle writes.
This module keeps logical array extraction separate from the physical
``safetensors`` transport used by bundle files. The torch codec preserves the
legacy write path; preview backend codecs expose NumPy arrays for direct unit
tests and future materializatio... |
d639cb4cebc6e2c2ebacfb00c1f3e9ac16c89238f145cbd28e73d7db1db1dd31 | Python | 73,525 | 1,905 | """Hardening regressions for the intelligent auto-collapse subsystem (round 21+).
Covers the round-20 adversarial-audit defect classes:
- multi-pass submodule reuse must not crash the smart-collapse surface;
- segment descriptor identity must be injective (plan/render parity);
- schedule ``collapsed_addresses`` must ... |
5d07ab34f91f9c5df6d85f061d32e64745a041861f186dcbee1912c809d8dd3e | Python | 73,589 | 1,424 | # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
"""
Train a model on a dataset.
Usage:
$ yolo train model=yolo26n.pt data=coco8.yaml imgsz=640 epochs=100 batch=16
"""
from __future__ import annotations
import gc
import math
import os
import subprocess
import time
import warnings
from copy imp... |
0763092a26e501ac77fc3de434a82ba5299c01d91ac09430b3343e9be16ef1cc | Python | 73,772 | 1,976 | """
This module define some usefull function that are use in different file
"""
import sys
from os import path
import os
import subprocess
import logging
from collections import namedtuple
from types import MethodType
import ast
import matplotlib.pyplot as plt
import pandas as pd
from statsmodels.nonparametric.smoothe... |
19959a1e149d4c01da7b78a04f8eba5d4e8e0aff495f0c15a105e04bbc1ef0d6 | Python | 73,948 | 1,544 | # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
from __future__ import annotations
import math
from pathlib import Path
from typing import Any
import torch
import torch.nn.functional as F
from torch import nn
from ultralytics.utils.metrics import CITYSCAPES_WEIGHT, OKS_SIGMA, RLE_WEIGHT
from ult... |
f1121ab14a2f19a91956bba0f2a58d04482e2544e0f6bcbb05edfa709bd3bdda | Python | 74,058 | 2,133 | """
The class `TsGroup` helps group objects with different timestamps
(i.e. timestamps of spikes of a population of neurons).
"""
import warnings
from collections import UserDict
from collections.abc import Hashable
from numbers import Number
import numpy
import numpy as np
import pandas as pd
from tabulate import ... |
46240cdef5fe05694816564886e1af5f2d8dc104edb88c010f67847a0b003318 | Python | 74,200 | 2,116 | # Skip to content
# Search or jump to…
# Pull requests
# Issues
# Marketplace
# Explore
# @tang37
# nipy
# /
# nitime
# 29
# 17471
# Code
# Issues
# 19
# Pull requests
# Actions
# Projects
# Wiki
# Security
# Insights
# nitime/nitime/utils.py /
# @arokem
# arokem Be explicit about sequence ... |
d7954fcec489f1fe6f7a5d3abb5375cec76616f0112f9779843618a56c25197f | Python | 74,364 | 1,623 | """
Universe configuration builder.
"""
# absolute_import needed for tool_shed package.
import configparser
import copy
import json
import locale
import logging
import logging.config
import os
import re
import socket
import string
import sys
import tempfile
import threading
from collections.abc import Callable
from d... |
3bbcb4342482438bb5d4ebe6509d514490dfce804617865fa55ffdcbda2fea12 | Python | 74,405 | 1,587 | from __future__ import print_function
import json, time, os, sys, glob
import shutil
import numpy as np
import torch
from torch import optim
from torch.utils.data import DataLoader
from torch.utils.data.dataset import random_split, Subset
import copy
import torch.nn as nn
import torch.nn.functional as F
import random
... |
129d325b6149bc0761bf1d44479662caf622f700a1b0e62de949b7749ddc1ad3 | Python | 74,961 | 1,624 | # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
"""
Ultralytics Results, Boxes, Masks, SemanticMask, Keypoints, Probs, and OBB classes for handling inference results.
Usage: See https://docs.ultralytics.com/modes/predict
"""
from __future__ import annotations
from copy import deepcopy
from functo... |
216e6e4d62bf862e1bcbe6960d0c95773acfb072af8769014ae1e5108a206b93 | Python | 75,275 | 1,729 | import itertools
import json
import logging
import math
import mimetypes
import os
import posixpath
import shutil
import string
import tempfile
from collections.abc import (
Callable,
Generator,
Iterable,
Iterator,
)
from inspect import isclass
from typing import (
Any,
IO,
Literal,
Opti... |
8ae87742ddd9b9d6e58a30fb1e4a5f9eba57e3275aaa9bda6f3afc30020aaae4 | Python | 75,343 | 1,896 | #!/usr/bin/python
import json
import logging
import os
import os.path as osp
import numpy as np
from qtpy import QtCore, QtGui
from qtpy import QtWidgets as QtW
import llspy
import llspy.gui.exceptions as err
import llspy.llsdir
from fiducialreg.fiducialreg import RegFile, RegistrationError
from llspy.gui import wor... |
d3b64c261a12c3f26b66b1398ac728db035d75b127b285e4bb55c63d92d6a722 | Python | 75,502 | 1,826 | """
This script was adapted from Niklas Wilming et al. Nature Communications 2020
https://github.com/DonnerLab/2020_Large-scale-Dynamics-of-Perceptual-Decision-Information-across-Human-Cortex
"""
import os
import pandas as pd
from glob import glob
import numpy as np
from joblib import Parallel, delayed
from joblib impo... |
378b503abcb581244b239099fb8ab9bb10f58a9975f8536548e9665138587319 | Python | 75,724 | 2,569 | # Author: Christian Brodbeck <christianbrodbeck@nyu.edu>
"""Document model for formatted text documents
This module defines classes for the abstract representation of a document,
which can be rendered into different formats.
Currently (incomplete) support for str, RTF, TeX, PDF (through TeX) and HTML.
Documents are ... |
d17d71d6406d3229b79c13c67aaef2e53c2ee6a5c3da5a30c98ce7e11dadd58a | Python | 75,745 | 1,946 | """
Unit tests for ethoscope_node.utils.configuration module.
Tests cover:
- Configuration file loading and parsing
- Settings validation
- Default value handling
- Error handling for invalid configurations
- File I/O operations
- Migration functionality
- User/incubator/sensor management
- Setup workflow
- Tunnel con... |
1aa22f66bf1ff24080c0bdf7a2aa836c33ee80e4d4842b6946d2af0b463fe442 | Python | 75,914 | 1,537 | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
94a7f1cc23d23dff99deda93b79ddb02ffb8a323ada60f4837ae96b89b1d01be | Python | 75,939 | 1,702 | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
bd0796467e3a6ffb739381e54ba9d011620f31c7f772e27a7689cbae9711bc70 | Python | 75,986 | 2,575 | import builtins
import math
import numpy as np
import torch
from keras.src.backend import KerasTensor
from keras.src.backend import config
from keras.src.backend.common import dtypes
from keras.src.backend.common.backend_utils import canonicalize_axis
from keras.src.backend.common.backend_utils import normalize_shift... |
51ad0514fcd3e28bff6d82650158ef8668699990cde6065ba3085df2ad74be05 | Python | 76,337 | 1,681 | """PyTorch ResNet
This started as a copy of https://github.com/pytorch/vision 'resnet.py' (BSD-3-Clause) with
additional dropout and dynamic global avg/max pool.
ResNeXt, SE-ResNeXt, SENet, and MXNet Gluon stem/downsample variants, tiered stems added by Ross Wightman
Copyright 2019, Ross Wightman
##Code modified by jf... |
9f98d54389266aab280001046c467695a8fcf730f325db772859e18169aee56e | Python | 76,472 | 2,065 | #!/usr/bin/env python
'''unit testing code for pysam.
Execute in the :file:`tests` directory as it requires the Makefile
and data files located there.
'''
import pytest
import errno
import os
import shutil
import collections
import subprocess
import logging
import array
from io import StringIO
from functools import ... |
7861f79029981c09ed3e8cf96f264a5ead8e3ef6898abae1260d22529472ab64 | Python | 76,729 | 2,043 | # --- THIS FILE IS AUTO-GENERATED ---
# Modifications will be overwitten the next time code generation run.
from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Violin(_BaseTraceType):
_parent_path_str = ""
_path_str = "violin"
_valid_props = {
... |
7ec7481d186ba9408a44d89e8827e4717add6baf259d843e9b1f26949b600fc4 | Python | 77,198 | 1,715 | # Copyright (c) 2025, Tri Dao.
from typing import Optional, Callable, TypeAlias, Tuple
from dataclasses import dataclass
import enum
import cutlass
import cutlass.cute as cute
from cutlass import Float32, Int32, Uint32, const_expr
from cutlass.cutlass_dsl import min as dsl_min
from quack import layout_utils
import f... |
0b5595b241dc05e5868cc0e13b7c37d80205e224a7e686f0b7ddabe8741bf0c1 | Python | 77,252 | 2,291 | """
The interactive arena canvas.
Renders the arena, its sources and its borders, and turns click and drag
gestures into edits of the underlying environment state.
"""
from __future__ import annotations
import math
from typing import Any, Iterable
import numpy as np
import panel as pn
from bokeh.colors import named... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.