Search is not available for this dataset
repo_id
stringlengths
12
110
file_path
stringlengths
24
164
content
stringlengths
3
89.3M
__index_level_0__
int64
0
0
public_repos/numpy-stubs/tests
public_repos/numpy-stubs/tests/reveal/numerictypes.py
import numpy as np reveal_type(np.issctype(np.generic)) # E: bool reveal_type(np.issctype("foo")) # E: bool reveal_type(np.obj2sctype("S8")) # E: Union[numpy.generic, None] reveal_type(np.obj2sctype("S8", default=None)) # E: Union[numpy.generic, None] reveal_type( np.obj2sctype("foo", default=int) # E: Union...
0
public_repos/numpy-stubs/tests
public_repos/numpy-stubs/tests/reveal/constants.py
import numpy as np reveal_type(np.Inf) # E: float reveal_type(np.Infinity) # E: float reveal_type(np.NAN) # E: float reveal_type(np.NINF) # E: float reveal_type(np.NZERO) # E: float reveal_type(np.NaN) # E: float reveal_type(np.PINF) # E: float reveal_type(np.PZERO) # E: float reveal_type(np.e) # E: float rev...
0
public_repos/numpy-stubs/tests
public_repos/numpy-stubs/tests/reveal/scalars.py
import numpy as np x = np.complex64(3 + 2j) reveal_type(x.real) # E: numpy.float32 reveal_type(x.imag) # E: numpy.float32 reveal_type(x.real.real) # E: numpy.float32 reveal_type(x.real.imag) # E: numpy.float32 reveal_type(x.itemsize) # E: int reveal_type(x.shape) # E: tuple[builtins.int] reveal_type(x.strides...
0
public_repos/numpy-stubs/tests
public_repos/numpy-stubs/tests/reveal/warnings_and_errors.py
from typing import Type import numpy as np reveal_type(np.ModuleDeprecationWarning()) # E: numpy.ModuleDeprecationWarning reveal_type(np.VisibleDeprecationWarning()) # E: numpy.VisibleDeprecationWarning reveal_type(np.ComplexWarning()) # E: numpy.ComplexWarning reveal_type(np.RankWarning()) # E: numpy.RankWarning...
0
public_repos/numpy-stubs/tests
public_repos/numpy-stubs/tests/reveal/fromnumeric.py
"""Tests for :mod:`numpy.core.fromnumeric`.""" import numpy as np A = np.array(True, ndmin=2, dtype=bool) B = np.array(1.0, ndmin=2, dtype=np.float32) A.setflags(write=False) B.setflags(write=False) a = np.bool_(True) b = np.float32(1.0) c = 1.0 reveal_type(np.take(a, 0)) # E: numpy.bool_ reveal_type(np.take(b, 0)...
0
public_repos/numpy-stubs/tests
public_repos/numpy-stubs/tests/reveal/ndarray_shape_manipulation.py
import numpy as np nd = np.array([[1, 2], [3, 4]]) # reshape reveal_type(nd.reshape()) # E: numpy.ndarray reveal_type(nd.reshape(4)) # E: numpy.ndarray reveal_type(nd.reshape(2, 2)) # E: numpy.ndarray reveal_type(nd.reshape((2, 2))) # E: numpy.ndarray reveal_type(nd.reshape((2, 2), order="C")) # E: numpy.ndarra...
0
public_repos/numpy-stubs/tests
public_repos/numpy-stubs/tests/reveal/ndarray_conversion.py
import numpy as np nd = np.array([[1, 2], [3, 4]]) # item reveal_type(nd.item()) # E: Any reveal_type(nd.item(1)) # E: Any reveal_type(nd.item(0, 1)) # E: Any reveal_type(nd.item((0, 1))) # E: Any # tolist reveal_type(nd.tolist()) # E: builtins.list[Any] # itemset does not return a value # tostring is pretty s...
0
public_repos/numpy-stubs
public_repos/numpy-stubs/scripts/find_ufuncs.py
import numpy as np def main(): ufuncs = [] for obj_name in np.__dir__(): obj = getattr(np, obj_name) if isinstance(obj, np.ufunc): ufuncs.append(obj) ufunc_stubs = [] for ufunc in set(ufuncs): ufunc_stubs.append(f"{ufunc.__name__}: ufunc") ufunc_stubs.sort() ...
0
public_repos
public_repos/Lightning-multinode-templates/README.md
# Lightning-multinode-templates Multinode templates for Pytorch Lightning
0
public_repos
public_repos/Lightning-multinode-templates/LICENSE
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, ...
0
public_repos/Lightning-multinode-templates
public_repos/Lightning-multinode-templates/fabric/fabric_ddp.py
import lightning as L import torch import torch.nn.functional as F from lightning.pytorch.demos import Transformer, WikiText2 from torch.utils.data import DataLoader, random_split def main(): L.seed_everything(42) fabric = L.Fabric(strategy="ddp") fabric.launch() # Data with fabric.rank_zero_fir...
0
public_repos/Lightning-multinode-templates
public_repos/Lightning-multinode-templates/fabric/fabric_deepspeed.py
#! pip install deepspeed import lightning as L import torch import torch.nn.functional as F from lightning.pytorch.demos import Transformer, WikiText2 from torch.utils.data import DataLoader, random_split def main(): L.seed_everything(42) fabric = L.Fabric(strategy="deepspeed") fabric.launch() # Da...
0
public_repos/Lightning-multinode-templates
public_repos/Lightning-multinode-templates/fabric/fabric_default.py
import lightning as L import torch import torch.nn.functional as F from lightning.pytorch.demos import Transformer, WikiText2 from torch.utils.data import DataLoader, random_split def main(): L.seed_everything(42) fabric = L.Fabric() fabric.launch() # Data with fabric.rank_zero_first(local=True)...
0
public_repos/Lightning-multinode-templates
public_repos/Lightning-multinode-templates/fabric/fabric_fsdp.py
import lightning as L import torch import torch.nn.functional as F from lightning.pytorch.demos import Transformer, WikiText2 from torch.utils.data import DataLoader, random_split from lightning.fabric.strategies.fsdp import FSDPStrategy def main(): L.seed_everything(42) fabric = L.Fabric(strategy=FSDPStrate...
0
public_repos/Lightning-multinode-templates
public_repos/Lightning-multinode-templates/pytorch_lightning/ptl_ddp.py
import lightning as L import torch import torch.nn.functional as F from lightning.pytorch.demos import Transformer, WikiText2 from torch.utils.data import DataLoader, random_split class LanguageDataModule(L.LightningDataModule): def __init__(self, batch_size): super().__init__() self.batch_size = ...
0
public_repos/Lightning-multinode-templates
public_repos/Lightning-multinode-templates/pytorch_lightning/ptl_deepspeed.py
#! pip install deepspeed import lightning as L import torch import torch.nn.functional as F from lightning.pytorch.demos import Transformer, WikiText2 from torch.utils.data import DataLoader, random_split class LanguageDataModule(L.LightningDataModule): def __init__(self, batch_size): super().__init__() ...
0
public_repos/Lightning-multinode-templates
public_repos/Lightning-multinode-templates/pytorch_lightning/ptl_fsdp.py
import lightning as L import torch import torch.nn.functional as F from lightning.pytorch.demos import Transformer, WikiText2 from torch.utils.data import DataLoader, random_split class LanguageDataModule(L.LightningDataModule): def __init__(self, batch_size): super().__init__() self.batch_size = ...
0
public_repos/Lightning-multinode-templates
public_repos/Lightning-multinode-templates/pytorch_lightning/ptl_default.py
import lightning as L import torch import torch.nn.functional as F from lightning.pytorch.demos import Transformer, WikiText2 from torch.utils.data import DataLoader, random_split class LanguageDataModule(L.LightningDataModule): def __init__(self, batch_size): super().__init__() self.batch_size = ...
0
public_repos/Lightning-multinode-templates
public_repos/Lightning-multinode-templates/tests/requirements.txt
lightning-sdk
0
public_repos/Lightning-multinode-templates
public_repos/Lightning-multinode-templates/tests/test_e2e.py
#! pip install lightning-sdk import os import time import uuid from lightning_sdk import Machine, Studio scripts = [ ("pytorch_lightning/ptl_default.py", "torch lightning", ["ptl_default.ckpt"]), ("pytorch_lightning/ptl_ddp.py", "torch lightning", ["ptl_ddp.ckpt"]), ("pytorch_lightning/ptl_fsdp.py", "tor...
0
public_repos/Lightning-multinode-templates
public_repos/Lightning-multinode-templates/pytorch/pytorch_ddp.py
import os import torch import torch.distributed as dist import torch.nn.functional as F from torch.utils.data import DataLoader, random_split from torch.nn.parallel import DistributedDataParallel as DDP import torch.multiprocessing as mp from torch.utils.data.distributed import DistributedSampler from lightning.pytor...
0
public_repos
public_repos/utilities/MANIFEST.in
include CHANGELOG.md recursive-include src py.typed graft src/lightning_utilities/test graft requirements prune src/lightning_utilities/cli
0
public_repos
public_repos/utilities/setup.py
#!/usr/bin/env python import glob import os from importlib.util import module_from_spec, spec_from_file_location from pkg_resources import parse_requirements from setuptools import find_packages, setup _PATH_ROOT = os.path.realpath(os.path.dirname(__file__)) _PATH_SOURCE = os.path.join(_PATH_ROOT, "src") _PATH_REQUIR...
0
public_repos
public_repos/utilities/.codecov.yml
# see https://docs.codecov.io/docs/codecov-yaml # Validation check: # $ curl --data-binary @.codecov.yml https://codecov.io/validate # https://docs.codecov.io/docs/codecovyml-reference codecov: bot: "codecov-io" strict_yaml_branch: "yaml-config" require_ci_to_pass: yes notify: # after_n_builds: 2 wait_...
0
public_repos
public_repos/utilities/Makefile
.PHONY: test clean docs # to imitate SLURM set only single node export SLURM_LOCALID=0 # assume you have installed need packages export SPHINX_MOCK_REQUIREMENTS=0 test: pip install -q -r requirements/cli.txt -r requirements/_tests.txt # use this to run tests rm -rf _ckpt_* rm -rf ./lightning_logs python -m cove...
0
public_repos
public_repos/utilities/.pre-commit-config.yaml
default_language_version: python: python3 ci: autofix_prs: true autoupdate_commit_msg: "[pre-commit.ci] pre-commit suggestions" autoupdate_schedule: monthly # submodules: true repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: - id: end-of-file-fixer - id:...
0
public_repos
public_repos/utilities/pyproject.toml
[metadata] license_file = "LICENSE" description-file = "README.md" [build-system] requires = [ "setuptools", "wheel", ] [tool.check-manifest] ignore = [ "*.yml", ".github", ".github/*" ] [tool.pytest.ini_options] norecursedirs = [ ".git", ".github", "dist", "build", "docs", ] ...
0
public_repos
public_repos/utilities/.prettierignore
# Ignore all MD files: **/*.md
0
public_repos
public_repos/utilities/README.md
# Lightning Utilities [![UnitTests](https://github.com/Lightning-AI/utilities/actions/workflows/ci-testing.yml/badge.svg?event=push)](https://github.com/Lightning-AI/utilities/actions/workflows/ci-testing.yml) [![Apply checks](https://github.com/Lightning-AI/utilities/actions/workflows/ci-use-checks.yaml/badge.svg?eve...
0
public_repos
public_repos/utilities/LICENSE
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, ...
0
public_repos
public_repos/utilities/CHANGELOG.md
# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [UnReleased] - 2023-MM-DD ### Added - ### Changed - ### ...
0
public_repos/utilities
public_repos/utilities/requirements/_docs.txt
sphinx >=6.0,<7.0 myst-parser >=2.0.0, <3.0.0 nbsphinx >=0.8.5 ipython[notebook] pandoc >=1.0 docutils >=0.16 # https://github.com/jupyterlab/jupyterlab_pygments/issues/5 pygments >=2.4.1 sphinxcontrib-fulltoc >=1.0 sphinxcontrib-mockautodoc pt-lightning-sphinx-theme @ https://github.com/Lightning-AI/lightning_sphinx_...
0
public_repos/utilities
public_repos/utilities/requirements/docs.txt
requests >=2.0.0
0
public_repos/utilities
public_repos/utilities/requirements/gha-schema.txt
check-jsonschema ==0.27.1
0
public_repos/utilities
public_repos/utilities/requirements/_tests.txt
coverage ==7.2.7 pytest ==7.4.3 pytest-cov ==4.1.0 pytest-timeout ==2.2.0
0
public_repos/utilities
public_repos/utilities/requirements/cli.txt
fire
0
public_repos/utilities
public_repos/utilities/requirements/typing.txt
mypy>=1.0.0 types-setuptools
0
public_repos/utilities
public_repos/utilities/requirements/base.txt
importlib-metadata >=4.0.0; python_version < '3.8' packaging >=17.1 setuptools typing_extensions
0
public_repos/utilities/src
public_repos/utilities/src/lightning_utilities/__about__.py
import time __version__ = "0.11.0dev" __author__ = "Lightning AI et al." __author_email__ = "pytorch@lightning.ai" __license__ = "Apache-2.0" __copyright__ = f"Copyright (c) 2022-{time.strftime('%Y')}, {__author__}." __homepage__ = "https://github.com/Lightning-AI/utilities" __docs__ = "Lightning toolbox for across th...
0
public_repos/utilities/src
public_repos/utilities/src/lightning_utilities/__init__.py
"""Root package info.""" import os from lightning_utilities.__about__ import * # noqa: F403 from lightning_utilities.core.apply_func import apply_to_collection from lightning_utilities.core.enums import StrEnum from lightning_utilities.core.imports import compare_version, module_available from lightning_utilities.co...
0
public_repos/utilities/src/lightning_utilities
public_repos/utilities/src/lightning_utilities/test/warning.py
# Licensed under the Apache License, Version 2.0 (the "License"); # http://www.apache.org/licenses/LICENSE-2.0 # import re import warnings from contextlib import contextmanager from typing import Generator, Optional, Type @contextmanager def no_warning_call(expected_warning: Type[Warning] = Warning, match: Option...
0
public_repos/utilities/src/lightning_utilities
public_repos/utilities/src/lightning_utilities/test/__init__.py
"""General testing functionality."""
0
public_repos/utilities/src/lightning_utilities
public_repos/utilities/src/lightning_utilities/core/enums.py
# Copyright The PyTorch Lightning team. # Licensed under the Apache License, Version 2.0 (the "License"); # http://www.apache.org/licenses/LICENSE-2.0 # import warnings from enum import Enum from typing import List, Optional from typing_extensions import Literal class StrEnum(str, Enum): """Type of any enume...
0
public_repos/utilities/src/lightning_utilities
public_repos/utilities/src/lightning_utilities/core/rank_zero.py
# Copyright The PyTorch Lightning team. # Licensed under the Apache License, Version 2.0 (the "License"); # http://www.apache.org/licenses/LICENSE-2.0 # """Utilities that can be used for calling functions on a particular rank.""" import logging import warnings from functools import wraps from platform import python...
0
public_repos/utilities/src/lightning_utilities
public_repos/utilities/src/lightning_utilities/core/inheritance.py
# Copyright The PyTorch Lightning team. # Licensed under the Apache License, Version 2.0 (the "License"); # http://www.apache.org/licenses/LICENSE-2.0 # from typing import Iterator, Set, Type def get_all_subclasses_iterator(cls: Type) -> Iterator[Type]: """Iterate over all subclasses.""" def recurse(cl: ...
0
public_repos/utilities/src/lightning_utilities
public_repos/utilities/src/lightning_utilities/core/apply_func.py
# Copyright The PyTorch Lightning team. # Licensed under the Apache License, Version 2.0 (the "License"); # http://www.apache.org/licenses/LICENSE-2.0 # import dataclasses from collections import OrderedDict, defaultdict from copy import deepcopy from typing import Any, Callable, List, Mapping, Optional, Sequence, ...
0
public_repos/utilities/src/lightning_utilities
public_repos/utilities/src/lightning_utilities/core/overrides.py
# Copyright The PyTorch Lightning team. # Licensed under the Apache License, Version 2.0 (the "License"); # http://www.apache.org/licenses/LICENSE-2.0 # from functools import partial from typing import Type from unittest.mock import Mock def is_overridden(method_name: str, instance: object, parent: Type[object]) ...
0
public_repos/utilities/src/lightning_utilities
public_repos/utilities/src/lightning_utilities/core/imports.py
# Copyright The PyTorch Lightning team. # Licensed under the Apache License, Version 2.0 (the "License"); # http://www.apache.org/licenses/LICENSE-2.0 import functools import importlib import os import warnings from functools import lru_cache from importlib.util import find_spec from types import ModuleType from t...
0
public_repos/utilities/src/lightning_utilities
public_repos/utilities/src/lightning_utilities/core/__init__.py
"""Core utilities.""" from lightning_utilities.core.apply_func import apply_to_collection from lightning_utilities.core.enums import StrEnum from lightning_utilities.core.imports import compare_version, module_available from lightning_utilities.core.overrides import is_overridden from lightning_utilities.core.rank_zero...
0
public_repos/utilities/src/lightning_utilities
public_repos/utilities/src/lightning_utilities/install/requirements.py
# Licensed under the Apache License, Version 2.0 (the "License"); # http://www.apache.org/licenses/LICENSE-2.0 # import re from distutils.version import LooseVersion from pathlib import Path from typing import Any, Iterable, Iterator, List, Optional, Union from pkg_resources import Requirement, yield_lines class...
0
public_repos/utilities/src/lightning_utilities
public_repos/utilities/src/lightning_utilities/install/__init__.py
"""Generic Installation tools.""" from lightning_utilities.install.requirements import Requirement, load_requirements __all__ = ["load_requirements", "Requirement"]
0
public_repos/utilities/src/lightning_utilities
public_repos/utilities/src/lightning_utilities/cli/__main__.py
# Copyright The PyTorch Lightning team. # Licensed under the Apache License, Version 2.0 (the "License"); # http://www.apache.org/licenses/LICENSE-2.0 # import fire from lightning_utilities.cli.dependencies import prune_pkgs_in_requirements, replace_oldest_ver def main() -> None: """CLI entry point.""" f...
0
public_repos/utilities/src/lightning_utilities
public_repos/utilities/src/lightning_utilities/cli/dependencies.py
# Copyright The PyTorch Lightning team. # Licensed under the Apache License, Version 2.0 (the "License"); # http://www.apache.org/licenses/LICENSE-2.0 # import glob import os.path from pprint import pprint from typing import Sequence REQUIREMENT_ROOT = "requirements.txt" REQUIREMENT_FILES_ALL: list = glob.glob(os....
0
public_repos/utilities/src/lightning_utilities
public_repos/utilities/src/lightning_utilities/cli/__init__.py
"""CLI root."""
0
public_repos/utilities/src/lightning_utilities
public_repos/utilities/src/lightning_utilities/docs/formatting.py
# Licensed under the Apache License, Version 2.0 (the "License"); # http://www.apache.org/licenses/LICENSE-2.0 # import glob import inspect import os import re import sys from typing import Tuple def _transform_changelog(path_in: str, path_out: str) -> None: """Adjust changelog titles so not to be duplicated....
0
public_repos/utilities/src/lightning_utilities
public_repos/utilities/src/lightning_utilities/docs/retriever.py
# Licensed under the Apache License, Version 2.0 (the "License"); # http://www.apache.org/licenses/LICENSE-2.0 # import glob import logging import os import re from typing import List, Tuple import requests def _download_file(file_url: str, folder: str) -> str: """Download a file from URL to a particular fol...
0
public_repos/utilities/src/lightning_utilities
public_repos/utilities/src/lightning_utilities/docs/__init__.py
from lightning_utilities.docs.retriever import fetch_external_assets
0
public_repos/utilities/tests
public_repos/utilities/tests/unittests/mocks.py
from typing import Any, Iterable from lightning_utilities.core.imports import package_available if package_available("torch"): import torch else: # minimal torch implementation to avoid installing torch in testing CI class TensorMock: def __init__(self, data) -> None: self.data = data ...
0
public_repos/utilities/tests
public_repos/utilities/tests/unittests/__init__.py
import os _PATH_UNITTESTS = os.path.dirname(__file__) _PATH_ROOT = os.path.dirname(os.path.dirname(_PATH_UNITTESTS))
0
public_repos/utilities/tests/unittests
public_repos/utilities/tests/unittests/test/test_warnings.py
import warnings from re import escape import pytest from lightning_utilities.test.warning import no_warning_call def test_no_warning_call(): with no_warning_call(): ... with pytest.raises(AssertionError, match=escape("`Warning` was raised: UserWarning('foo')")), no_warning_call(): warnings.w...
0
public_repos/utilities/tests/unittests
public_repos/utilities/tests/unittests/core/test_apply_func.py
import dataclasses import numbers from collections import OrderedDict, defaultdict, namedtuple from dataclasses import InitVar from typing import Any, ClassVar, List, Optional import pytest from lightning_utilities.core.apply_func import apply_to_collection, apply_to_collections from unittests.mocks import torch _TEN...
0
public_repos/utilities/tests/unittests
public_repos/utilities/tests/unittests/core/test_inheritance.py
from lightning_utilities.core.inheritance import get_all_subclasses def test_get_all_subclasses(): class A1: ... class A2(A1): ... class B1: ... class B2(B1): ... class C(A2, B2): ... assert get_all_subclasses(A1) == {A2, C} assert get_all_subcl...
0
public_repos/utilities/tests/unittests
public_repos/utilities/tests/unittests/core/test_overrides.py
from contextlib import contextmanager from functools import partial, wraps from typing import Any, Callable from unittest.mock import Mock import pytest from lightning_utilities.core.overrides import is_overridden class LightningModule: def training_step(self): ... class BoringModel(LightningModule): ...
0
public_repos/utilities/tests/unittests
public_repos/utilities/tests/unittests/core/test_enums.py
from enum import Enum from lightning_utilities.core.enums import StrEnum def test_consistency(): class MyEnum(StrEnum): FOO = "FOO" BAR = "BAR" BAZ = "BAZ" NUM = "32" # normal equality, case invariant assert MyEnum.FOO == "FOO" assert MyEnum.FOO == "foo" # int su...
0
public_repos/utilities/tests/unittests
public_repos/utilities/tests/unittests/core/test_imports.py
import operator import re import pytest from lightning_utilities.core.imports import ( RequirementCache, compare_version, get_dependency_min_version_spec, lazy_import, module_available, requires, ) try: from importlib.metadata import PackageNotFoundError except ImportError: # Python < ...
0
public_repos/utilities/tests/unittests
public_repos/utilities/tests/unittests/core/test_rank_zero.py
import pytest from lightning_utilities.core.rank_zero import rank_prefixed_message, rank_zero_only def test_rank_zero_only_raises(): foo = rank_zero_only(lambda x: x + 1) with pytest.raises(RuntimeError, match="rank_zero_only.rank` needs to be set "): foo(1) @pytest.mark.parametrize("rank", [0, 1, 4...
0
public_repos/utilities/tests/unittests
public_repos/utilities/tests/unittests/cli/test_dependencies.py
from pathlib import Path from lightning_utilities.cli.dependencies import prune_pkgs_in_requirements, replace_oldest_ver _PATH_ROOT = Path(__file__).parent.parent.parent def test_prune_packages(tmpdir): req_file = tmpdir / "requirements.txt" with open(req_file, "w") as fp: fp.writelines(["fire\n", "...
0
public_repos/utilities/tests/unittests
public_repos/utilities/tests/unittests/docs/test_retriever.py
import os.path import shutil from unittests import _PATH_ROOT from lightning_utilities.docs import fetch_external_assets def test_retriever_s3(): path_docs = os.path.join(_PATH_ROOT, "docs", "source") path_index = os.path.join(path_docs, "index.rst") path_page = os.path.join(path_docs, "any", "extra", "...
0
public_repos/utilities/tests
public_repos/utilities/tests/scripts/test_adjust_torch_versions.py
import os import platform import subprocess import sys from scripts import _PATH_SCRIPTS REQUIREMENTS_SAMPLE = """ # This is sample requirements file # with multi line comments torchvision >=0.13.0, <0.16.0 # sample # comment gym[classic,control] >=0.17.0, <0.27.0 ipython[all] <8.15.0 # strict torchmetrics >=0.10...
0
public_repos/utilities/tests
public_repos/utilities/tests/scripts/__init__.py
import os _PATH_HERE = os.path.dirname(__file__) _PATH_ROOT = os.path.dirname(os.path.dirname(_PATH_HERE)) _PATH_SCRIPTS = os.path.join(_PATH_ROOT, "scripts")
0
public_repos/utilities
public_repos/utilities/scripts/adjust-torch-versions.py
# Licensed under the Apache License, Version 2.0 (the "License"); # http://www.apache.org/licenses/LICENSE-2.0 # """Adjusting version across PTorch ecosystem.""" import logging import os import re import sys from typing import Dict, List, Optional VERSIONS = [ {"torch": "2.2.0", "torchvision": "0.17.0", "torch...
0
public_repos/utilities
public_repos/utilities/docs/make.bat
@ECHO OFF pushd %~dp0 REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set SOURCEDIR=source set BUILDDIR=build if "%1" == "" goto help %SPHINXBUILD% >NUL 2>NUL if errorlevel 9009 ( echo. echo.The 'sphinx-build' command was not found. Make sure you have Sphinx ...
0
public_repos/utilities
public_repos/utilities/docs/Makefile
# Minimal makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = -T -W SPHINXBUILD = python $(shell which sphinx-build) SOURCEDIR = source BUILDDIR = build # Put it first so that "make" without argument is like "make help". help: @$(SPHINXBUILD) -M help "$...
0
public_repos/utilities
public_repos/utilities/docs/.build_docs.sh
make clean make html --debug --jobs $(nproc)
0
public_repos/utilities
public_repos/utilities/docs/.readthedocs.yaml
# .readthedocs.yml in docs/ ~ need to be re-defined in RTFD settings UI # Read the Docs configuration file # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details # Required version: 2 # Set the OS, Python version and other tools you might need build: os: ubuntu-22.04 tools: python: "3.8" ...
0
public_repos/utilities/docs
public_repos/utilities/docs/source/index.rst
.. LightningAI-DevToolbox documentation master file, created by sphinx-quickstart on Wed Mar 25 21:34:07 2020. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Lightning-DevToolbox documentation ================================== .. figure:: http...
0
public_repos/utilities/docs
public_repos/utilities/docs/source/conf.py
# # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config import glob import inspect import os import re import sys import pt_lightning_sphinx_theme import l...
0
public_repos/utilities/docs/source
public_repos/utilities/docs/source/_templates/theme_variables.jinja
{%- set external_urls = { 'github': 'https://github.com/Lightning-AI/utilities', 'github_issues': 'https://github.com/Lightning-AI/utilities/issues', 'contributing': 'https://github.com/Lightning-AI/lightning/blob/master/CONTRIBUTING.md', 'governance': 'https://github.com/Lightning-AI/lightning/blob/master/gove...
0
public_repos/utilities/docs/source
public_repos/utilities/docs/source/_static/copybutton.js
/* Copied from the official Python docs: https://docs.python.org/3/_static/copybutton.js */ $(document).ready(function () { /* Add a [>>>] button on the top-right corner of code samples to hide * the >>> and ... prompts and the output and thus make the code * copyable. */ var div = $( ".highlight-python ....
0
public_repos/utilities/docs/source/_static
public_repos/utilities/docs/source/_static/images/logo.svg
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sod...
0
public_repos/utilities/docs/source/_static
public_repos/utilities/docs/source/_static/images/logo-small.svg
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sod...
0
public_repos/utilities/docs/source/_static
public_repos/utilities/docs/source/_static/images/icon.svg
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sod...
0
public_repos/utilities/docs/source/_static
public_repos/utilities/docs/source/_static/images/logo-large.svg
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sod...
0
public_repos
public_repos/pandas/environment.yml
# Local development dependencies including docs building, website upload, ASV benchmark name: pandas-dev channels: - conda-forge dependencies: - python=3.10 - pip # build dependencies - versioneer[toml] - cython=3.0.5 - meson[ninja]=1.2.1 - meson-python=0.13.1 # test dependencies - pytest>=7.3.2 ...
0
public_repos
public_repos/pandas/MANIFEST.in
graft doc prune doc/build graft LICENSES graft pandas global-exclude *.bz2 global-exclude *.csv global-exclude *.data global-exclude *.dta global-exclude *.feather global-exclude *.tar global-exclude *.gz global-exclude *.h5 global-exclude *.html global-exclude *.json global-exclude *.jsonl global-exclude *.kml glob...
0
public_repos
public_repos/pandas/generate_pxi.py
import argparse import os from Cython import Tempita def process_tempita(pxifile, outfile): with open(pxifile, encoding="utf-8") as f: tmpl = f.read() pyxcontent = Tempita.sub(tmpl) with open(outfile, "w", encoding="utf-8") as f: f.write(pyxcontent) def main(): parser = argparse.Ar...
0
public_repos
public_repos/pandas/CITATION.cff
cff-version: 1.2.0 title: 'pandas-dev/pandas: Pandas' message: 'If you use this software, please cite it as below.' authors: - name: "The pandas development team" abstract: "Pandas is a powerful data structures for data analysis, time series, and statistics." license: BSD-3-Clause license-url: "https://github.com/pan...
0
public_repos
public_repos/pandas/generate_version.py
#!/usr/bin/env python3 # Note: This file has to live next to setup.py or versioneer will not work import argparse import os import sys import versioneer sys.path.insert(0, "") def write_version_info(path): version = None git_version = None try: import _version_meson version = _version...
0
public_repos
public_repos/pandas/meson.build
# This file is adapted from https://github.com/scipy/scipy/blob/main/meson.build project( 'pandas', 'c', 'cpp', 'cython', version: run_command(['generate_version.py', '--print'], check: true).stdout().strip(), license: 'BSD-3', meson_version: '>=1.2.1', default_options: [ 'buildtype=rele...
0
public_repos
public_repos/pandas/setup.py
#!/usr/bin/env python3 """ Parts of this file were taken from the pyzmq project (https://github.com/zeromq/pyzmq) which have been permitted for use under the BSD license. Parts are from lxml (https://github.com/lxml/lxml) """ import argparse import multiprocessing import os from os.path import join as pjoin import pl...
0
public_repos
public_repos/pandas/.pre-commit-config.yaml
minimum_pre_commit_version: 2.15.0 exclude: ^LICENSES/|\.(html|csv|svg)$ # reserve "manual" for relatively slow hooks which we still want to run in CI default_stages: [ commit, merge-commit, push, prepare-commit-msg, commit-msg, post-checkout, post-commit, post-merge, post-rewrite ] ...
0
public_repos
public_repos/pandas/Dockerfile
FROM python:3.10.8 WORKDIR /home/pandas RUN apt-get update && apt-get -y upgrade RUN apt-get install -y build-essential # hdf5 needed for pytables installation RUN apt-get install -y libhdf5-dev RUN python -m pip install --upgrade pip RUN python -m pip install \ -r https://raw.githubusercontent.com/pandas-dev/pa...
0
public_repos
public_repos/pandas/requirements-dev.txt
# This file is auto-generated from environment.yml, do not modify. # See that file for comments about the need/usage of each dependency. pip versioneer[toml] cython==3.0.5 meson[ninja]==1.2.1 meson-python==0.13.1 pytest>=7.3.2 pytest-cov pytest-xdist>=2.2.0 coverage python-dateutil numpy<2 pytz beautifulsoup4>=4.11.2 ...
0
public_repos
public_repos/pandas/AUTHORS.md
About the Copyright Holders =========================== * Copyright (c) 2008-2011 AQR Capital Management, LLC AQR Capital Management began pandas development in 2008. Development was led by Wes McKinney. AQR released the source under this license in 2009. * Copyright (c) 2011-2012, Lambda Foundry, Inc. ...
0
public_repos
public_repos/pandas/pyproject.toml
[build-system] # Minimum requirements for the build system to execute. # See https://github.com/scipy/scipy/pull/12940 for the AIX issue. requires = [ "meson-python==0.13.1", "meson==1.2.1", "wheel", "Cython==3.0.5", # Note: sync with setup.py, environment.yml and asv.conf.json # Any NumPy version ...
0
public_repos
public_repos/pandas/.devcontainer.json
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or the definition README at // https://github.com/microsoft/vscode-dev-containers/tree/master/containers/python-3-miniconda { "name": "pandas", "context": ".", "dockerFile": "Dockerfile", // Use 'settings' to set *default* container specific...
0
public_repos
public_repos/pandas/codecov.yml
codecov: branch: main notify: after_n_builds: 10 comment: false coverage: status: project: default: target: '82' patch: default: target: '50' informational: true github_checks: annotations: false
0
public_repos
public_repos/pandas/pyright_reportGeneralTypeIssues.json
{ "typeCheckingMode": "off", "reportGeneralTypeIssues": true, "useLibraryCodeForTypes": false, "include": [ "pandas", "typings" ], "exclude": [ "pandas/tests", "pandas/io/clipboard", "pandas/util/version", "pandas/_testing/__init__....
0
public_repos
public_repos/pandas/README.md
<div align="center"> <img src="https://pandas.pydata.org/static/img/pandas.svg"><br> </div> ----------------- # pandas: powerful Python data analysis toolkit | | | | --- | --- | | Testing | [![CI - Test](https://github.com/pandas-dev/pandas/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/pandas-dev...
0
public_repos
public_repos/pandas/LICENSE
BSD 3-Clause License Copyright (c) 2008-2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team All rights reserved. Copyright (c) 2011-2023, Open source contributors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the followin...
0