repo stringlengths 7 90 | file_url stringlengths 81 315 | file_path stringlengths 4 228 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:38:15 2026-01-05 02:33:18 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/_testing/asserters.py | pandas/_testing/asserters.py | from __future__ import annotations
import operator
from typing import (
TYPE_CHECKING,
Literal,
NoReturn,
cast,
)
import warnings
import numpy as np
from pandas._libs import lib
from pandas._libs.missing import is_matching_na
from pandas._libs.sparse import SparseIndex
import pandas._libs.testing as ... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | true |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/_testing/contexts.py | pandas/_testing/contexts.py | from __future__ import annotations
from contextlib import contextmanager
import os
import sys
from typing import (
IO,
TYPE_CHECKING,
)
from pandas.compat import CHAINED_WARNING_DISABLED
from pandas.errors import ChainedAssignmentError
from pandas.io.common import get_handle
if TYPE_CHECKING:
from colle... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/_testing/_io.py | pandas/_testing/_io.py | from __future__ import annotations
import gzip
import io
import tarfile
from typing import (
TYPE_CHECKING,
Any,
)
import uuid
import zipfile
from pandas.compat._optional import import_optional_dependency
import pandas as pd
if TYPE_CHECKING:
from collections.abc import Callable
from pandas._typing... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/spss.py | pandas/io/spss.py | from __future__ import annotations
from typing import (
TYPE_CHECKING,
Any,
)
from pandas._libs import lib
from pandas.compat._optional import import_optional_dependency
from pandas.util._decorators import set_module
from pandas.util._validators import check_dtype_backend
from pandas.core.dtypes.inference im... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/stata.py | pandas/io/stata.py | """
Module contains tools for processing Stata files into DataFrames
The StataReader below was originally written by Joe Presbrey as part of PyDTA.
It has been extended and improved by Skipper Seabold from the Statsmodels
project who also developed the StataWriter and was finally added to pandas in
a once again improv... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | true |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/orc.py | pandas/io/orc.py | """orc compat"""
from __future__ import annotations
import io
from typing import (
TYPE_CHECKING,
Any,
Literal,
)
from pandas._libs import lib
from pandas.compat._optional import import_optional_dependency
from pandas.util._decorators import set_module
from pandas.util._validators import check_dtype_back... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/api.py | pandas/io/api.py | """
Data I/O API
"""
from pandas.io.clipboards import read_clipboard
from pandas.io.excel import (
ExcelFile,
ExcelWriter,
read_excel,
)
from pandas.io.feather_format import read_feather
from pandas.io.html import read_html
from pandas.io.iceberg import read_iceberg
from pandas.io.json import read_json
fro... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/pytables.py | pandas/io/pytables.py | """
High level interface to PyTables for reading and writing pandas data structures
to disk
"""
from __future__ import annotations
from contextlib import suppress
import copy
from datetime import (
date,
tzinfo,
)
import itertools
import os
import re
from textwrap import dedent
from typing import (
TYPE_C... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | true |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/common.py | pandas/io/common.py | """Common I/O API utilities"""
from __future__ import annotations
from abc import (
ABC,
abstractmethod,
)
import codecs
from collections import defaultdict
from collections.abc import (
Hashable,
Mapping,
Sequence,
)
import dataclasses
import functools
import gzip
from io import (
BufferedIOB... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | true |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/html.py | pandas/io/html.py | """
:mod:`pandas.io.html` is a module containing functionality for dealing with
HTML IO.
"""
from __future__ import annotations
from collections import abc
import errno
import numbers
import os
import re
from re import Pattern
from typing import (
TYPE_CHECKING,
Literal,
cast,
)
from pandas._libs import... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | true |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/clipboards.py | pandas/io/clipboards.py | """io on the clipboard"""
from __future__ import annotations
from io import StringIO
from typing import TYPE_CHECKING
import warnings
from pandas._libs import lib
from pandas.util._decorators import set_module
from pandas.util._exceptions import find_stack_level
from pandas.util._validators import check_dtype_backen... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/sql.py | pandas/io/sql.py | """
Collection of query wrappers / abstractions to both facilitate data
retrieval and to reduce dependency on DB-specific API.
"""
from __future__ import annotations
from abc import (
ABC,
abstractmethod,
)
from contextlib import (
ExitStack,
contextmanager,
)
from datetime import (
date,
date... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | true |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/parquet.py | pandas/io/parquet.py | """parquet compat"""
from __future__ import annotations
import io
import json
import os
from typing import (
TYPE_CHECKING,
Any,
Literal,
)
from warnings import (
catch_warnings,
filterwarnings,
)
from pandas._libs import lib
from pandas.compat._optional import import_optional_dependency
from pan... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/xml.py | pandas/io/xml.py | """
:mod:``pandas.io.xml`` is a module for reading XML.
"""
from __future__ import annotations
import io
from os import PathLike
from typing import (
TYPE_CHECKING,
Any,
)
from pandas._libs import lib
from pandas.compat._optional import import_optional_dependency
from pandas.errors import (
AbstractMetho... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | true |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/_util.py | pandas/io/_util.py | from __future__ import annotations
from typing import (
TYPE_CHECKING,
Literal,
)
import numpy as np
from pandas._config import using_string_dtype
from pandas._libs import lib
from pandas.compat import (
pa_version_under18p0,
pa_version_under19p0,
)
from pandas.compat._optional import import_optiona... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/__init__.py | pandas/io/__init__.py | # ruff: noqa: TC004
from typing import TYPE_CHECKING
if TYPE_CHECKING:
# import modules that have public classes/functions
from pandas.io import (
formats,
json,
stata,
)
# mark only those modules as public
__all__ = ["formats", "json", "stata"]
| python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/pickle.py | pandas/io/pickle.py | """pickle compat"""
from __future__ import annotations
import pickle
from typing import (
TYPE_CHECKING,
Any,
)
import warnings
from pandas.compat import pickle_compat
from pandas.util._decorators import set_module
from pandas.io.common import get_handle
if TYPE_CHECKING:
from pandas._typing import (
... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/iceberg.py | pandas/io/iceberg.py | from typing import (
Any,
)
from pandas.compat._optional import import_optional_dependency
from pandas.util._decorators import set_module
from pandas import DataFrame
@set_module("pandas")
def read_iceberg(
table_identifier: str,
catalog_name: str | None = None,
*,
catalog_properties: dict[str, ... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/feather_format.py | pandas/io/feather_format.py | """feather-format compat"""
from __future__ import annotations
from typing import (
TYPE_CHECKING,
Any,
)
import warnings
from pandas._config import using_string_dtype
from pandas._libs import lib
from pandas.compat._optional import import_optional_dependency
from pandas.errors import Pandas4Warning
from pa... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/sas/sasreader.py | pandas/io/sas/sasreader.py | """
Read SAS sas7bdat or xport files.
"""
from __future__ import annotations
from abc import (
ABC,
abstractmethod,
)
from collections.abc import Iterator
from typing import (
TYPE_CHECKING,
Self,
overload,
)
from pandas.util._decorators import (
doc,
set_module,
)
from pandas.core.share... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/sas/sas_constants.py | pandas/io/sas/sas_constants.py | from __future__ import annotations
from typing import Final
magic: Final = (
b"\x00\x00\x00\x00\x00\x00\x00\x00"
b"\x00\x00\x00\x00\xc2\xea\x81\x60"
b"\xb3\x14\x11\xcf\xbd\x92\x08\x00"
b"\x09\xc7\x31\x8c\x18\x1f\x10\x11"
)
align_1_checker_value: Final = b"3"
align_1_offset: Final = 32
align_1_length:... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/sas/sas7bdat.py | pandas/io/sas/sas7bdat.py | """
Read SAS7BDAT files
Based on code written by Jared Hobbs:
https://bitbucket.org/jaredhobbs/sas7bdat
See also:
https://github.com/BioStatMatt/sas7bdat
Partial documentation of the file format:
https://cran.r-project.org/package=sas7bdat/vignettes/sas7bdat.pdf
Reference for binary data compression:
http:/... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/sas/sas_xport.py | pandas/io/sas/sas_xport.py | """
Read a SAS XPort format file into a Pandas DataFrame.
Based on code from Jack Cushman (github.com/jcushman/xport).
The file format is defined here:
https://support.sas.com/content/dam/SAS/support/en/technical-papers/record-layout-of-a-sas-version-5-or-6-data-set-in-sas-transport-xport-format.pdf
"""
from __futu... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/sas/__init__.py | pandas/io/sas/__init__.py | from pandas.io.sas.sasreader import read_sas
__all__ = ["read_sas"]
| python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/excel/_xlrd.py | pandas/io/excel/_xlrd.py | from __future__ import annotations
from datetime import time
import math
from typing import TYPE_CHECKING
import numpy as np
from pandas.compat._optional import import_optional_dependency
from pandas.util._decorators import doc
from pandas.core.shared_docs import _shared_docs
from pandas.io.excel._base import Base... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/excel/_base.py | pandas/io/excel/_base.py | from __future__ import annotations
from collections.abc import (
Callable,
Hashable,
Iterable,
Mapping,
Sequence,
)
import datetime
from decimal import Decimal
from functools import partial
import os
from typing import (
IO,
TYPE_CHECKING,
Any,
Generic,
Literal,
Self,
Ty... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | true |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/excel/_odswriter.py | pandas/io/excel/_odswriter.py | from __future__ import annotations
from collections import defaultdict
import datetime
import json
from typing import (
TYPE_CHECKING,
Any,
DefaultDict,
cast,
overload,
)
from pandas.io.excel._base import ExcelWriter
from pandas.io.excel._util import (
combine_kwargs,
validate_freeze_panes... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/excel/_calamine.py | pandas/io/excel/_calamine.py | from __future__ import annotations
from datetime import (
date,
datetime,
time,
timedelta,
)
from typing import (
TYPE_CHECKING,
Any,
TypeAlias,
)
from pandas.compat._optional import import_optional_dependency
from pandas.util._decorators import doc
from pandas.core.shared_docs import _sh... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/excel/_odfreader.py | pandas/io/excel/_odfreader.py | from __future__ import annotations
from typing import (
TYPE_CHECKING,
cast,
)
import numpy as np
from pandas._typing import (
FilePath,
ReadBuffer,
Scalar,
StorageOptions,
)
from pandas.compat._optional import import_optional_dependency
from pandas.util._decorators import doc
import pandas ... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/excel/_util.py | pandas/io/excel/_util.py | from __future__ import annotations
from collections.abc import (
Callable,
Hashable,
Iterable,
MutableMapping,
Sequence,
)
from typing import (
TYPE_CHECKING,
Any,
Literal,
TypeVar,
overload,
)
from pandas.compat._optional import import_optional_dependency
from pandas.core.dty... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/excel/_openpyxl.py | pandas/io/excel/_openpyxl.py | from __future__ import annotations
import mmap
from typing import (
TYPE_CHECKING,
Any,
cast,
)
import numpy as np
from pandas.compat._optional import import_optional_dependency
from pandas.util._decorators import doc
from pandas.core.shared_docs import _shared_docs
from pandas.io.excel._base import (
... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/excel/__init__.py | pandas/io/excel/__init__.py | from pandas.io.excel._base import (
ExcelFile,
ExcelWriter,
read_excel,
)
from pandas.io.excel._odswriter import ODSWriter as _ODSWriter
from pandas.io.excel._openpyxl import OpenpyxlWriter as _OpenpyxlWriter
from pandas.io.excel._util import register_writer
from pandas.io.excel._xlsxwriter import XlsxWrite... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/excel/_pyxlsb.py | pandas/io/excel/_pyxlsb.py | # pyright: reportMissingImports=false
from __future__ import annotations
from typing import TYPE_CHECKING
from pandas.compat._optional import import_optional_dependency
from pandas.util._decorators import doc
from pandas.core.shared_docs import _shared_docs
from pandas.io.excel._base import BaseExcelReader
if TYPE... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/excel/_xlsxwriter.py | pandas/io/excel/_xlsxwriter.py | from __future__ import annotations
import json
from typing import (
TYPE_CHECKING,
Any,
)
from pandas.io.excel._base import ExcelWriter
from pandas.io.excel._util import (
combine_kwargs,
validate_freeze_panes,
)
if TYPE_CHECKING:
from pandas._typing import (
ExcelWriterIfSheetExists,
... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/json/_normalize.py | pandas/io/json/_normalize.py | # ---------------------------------------------------------------------
# JSON normalization routines
from __future__ import annotations
from collections import (
abc,
defaultdict,
)
import copy
from typing import (
TYPE_CHECKING,
Any,
DefaultDict,
overload,
)
import numpy as np
from pandas._... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/json/_json.py | pandas/io/json/_json.py | from __future__ import annotations
from abc import (
ABC,
abstractmethod,
)
from collections import abc
from itertools import islice
from typing import (
TYPE_CHECKING,
Any,
Generic,
Literal,
Self,
TypeVar,
final,
overload,
)
import numpy as np
from pandas._config import optio... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | true |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/json/_table_schema.py | pandas/io/json/_table_schema.py | """
Table Schema builders
https://specs.frictionlessdata.io/table-schema/
"""
from __future__ import annotations
from typing import (
TYPE_CHECKING,
Any,
cast,
)
import warnings
from pandas._config import option_context
from pandas._libs import lib
from pandas._libs.json import ujson_loads
from pandas.... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/json/__init__.py | pandas/io/json/__init__.py | from pandas.io.json._json import (
read_json,
to_json,
ujson_dumps,
ujson_loads,
)
from pandas.io.json._table_schema import build_table_schema
__all__ = [
"build_table_schema",
"read_json",
"to_json",
"ujson_dumps",
"ujson_loads",
]
| python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/clipboard/__init__.py | pandas/io/clipboard/__init__.py | """
Pyperclip
A cross-platform clipboard module for Python,
with copy & paste functions for plain text.
By Al Sweigart al@inventwithpython.com
Licence at LICENSES/PYPERCLIP_LICENSE
Usage:
import pyperclip
pyperclip.copy('The text to be copied to the clipboard.')
spam = pyperclip.paste()
if not pyperclip.is_a... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/formats/format.py | pandas/io/formats/format.py | """
Internal module for formatting output data in csv, html, xml,
and latex files. This module also applies to display formatting.
"""
from __future__ import annotations
from collections.abc import (
Callable,
Generator,
Hashable,
Mapping,
Sequence,
)
from contextlib import contextmanager
from csv... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | true |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/formats/printing.py | pandas/io/formats/printing.py | """
Printing tools.
"""
from __future__ import annotations
from collections.abc import (
Callable,
Iterable,
Mapping,
Sequence,
)
import sys
from typing import (
TYPE_CHECKING,
Any,
TypeAlias,
TypeVar,
)
from unicodedata import east_asian_width
from pandas._config import get_option
f... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/formats/excel.py | pandas/io/formats/excel.py | """
Utilities for conversion to writer-agnostic Excel representation.
"""
from __future__ import annotations
from collections.abc import (
Callable,
Hashable,
Iterable,
Mapping,
Sequence,
)
import functools
import itertools
import re
from typing import (
TYPE_CHECKING,
Any,
cast,
)
imp... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | true |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/formats/string.py | pandas/io/formats/string.py | """
Module for formatting output data in console (to string).
"""
from __future__ import annotations
from shutil import get_terminal_size
from typing import TYPE_CHECKING
import numpy as np
from pandas.io.formats.printing import pprint_thing
if TYPE_CHECKING:
from collections.abc import Iterable
from pand... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/formats/_color_data.py | pandas/io/formats/_color_data.py | # GH37967: Enable the use of CSS named colors, as defined in
# matplotlib.colors.CSS4_COLORS, when exporting to Excel.
# This data has been copied here, instead of being imported from matplotlib,
# not to have ``to_excel`` methods require matplotlib.
# source: matplotlib._color_data (3.3.3)
from __future__ import annot... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/formats/html.py | pandas/io/formats/html.py | """
Module for formatting output data in HTML.
"""
from __future__ import annotations
from textwrap import dedent
from typing import (
TYPE_CHECKING,
Any,
Final,
cast,
)
from pandas._config import get_option
from pandas._libs import lib
from pandas import (
MultiIndex,
option_context,
)
fr... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/formats/style_render.py | pandas/io/formats/style_render.py | from __future__ import annotations
from collections import defaultdict
from collections.abc import (
Callable,
Sequence,
)
from functools import partial
import pathlib
import re
from typing import (
TYPE_CHECKING,
Any,
DefaultDict,
TypeAlias,
TypedDict,
)
from uuid import uuid4
import nump... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | true |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/formats/csvs.py | pandas/io/formats/csvs.py | """
Module for formatting output data into CSV files.
"""
from __future__ import annotations
from collections.abc import (
Hashable,
Iterable,
Iterator,
Sequence,
)
import csv as csvlib
import os
from typing import (
TYPE_CHECKING,
Any,
cast,
)
import numpy as np
from pandas._libs import... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/formats/css.py | pandas/io/formats/css.py | """
Utilities for interpreting CSS from Stylers for formatting non-HTML outputs.
"""
from __future__ import annotations
import re
from typing import TYPE_CHECKING
import warnings
from pandas.errors import CSSWarning
from pandas.util._exceptions import find_stack_level
if TYPE_CHECKING:
from collections.abc impo... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/formats/xml.py | pandas/io/formats/xml.py | """
:mod:`pandas.io.formats.xml` is a module for formatting data in XML.
"""
from __future__ import annotations
import codecs
import io
from typing import (
TYPE_CHECKING,
Any,
final,
)
from pandas.errors import AbstractMethodError
from pandas.util._decorators import (
cache_readonly,
doc,
)
fro... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/formats/console.py | pandas/io/formats/console.py | """
Internal module for console introspection
"""
from __future__ import annotations
from shutil import get_terminal_size
def get_console_size() -> tuple[int | None, int | None]:
"""
Return console size as tuple = (width, height).
Returns (None,None) in non-interactive session.
"""
from pandas ... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/formats/__init__.py | pandas/io/formats/__init__.py | # ruff: noqa: TC004
from typing import TYPE_CHECKING
if TYPE_CHECKING:
# import modules that have public classes/functions
from pandas.io.formats import style
# and mark only those modules as public
__all__ = ["style"]
| python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/formats/info.py | pandas/io/formats/info.py | from __future__ import annotations
from abc import (
ABC,
abstractmethod,
)
import sys
from textwrap import dedent
from typing import TYPE_CHECKING
from pandas._config import get_option
from pandas.io.formats import format as fmt
from pandas.io.formats.printing import pprint_thing
if TYPE_CHECKING:
from... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | true |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/formats/style.py | pandas/io/formats/style.py | """
Module for applying conditional formatting to DataFrames and Series.
"""
from __future__ import annotations
import copy
from functools import partial
import operator
from typing import (
TYPE_CHECKING,
Concatenate,
Self,
overload,
)
import numpy as np
from pandas._config import get_option
from ... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | true |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/parsers/c_parser_wrapper.py | pandas/io/parsers/c_parser_wrapper.py | from __future__ import annotations
from collections import defaultdict
from typing import TYPE_CHECKING
import warnings
import numpy as np
from pandas._libs import (
lib,
parsers,
)
from pandas.compat._optional import import_optional_dependency
from pandas.errors import DtypeWarning
from pandas.util._excepti... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/parsers/arrow_parser_wrapper.py | pandas/io/parsers/arrow_parser_wrapper.py | from __future__ import annotations
from typing import TYPE_CHECKING
import warnings
from pandas._libs import lib
from pandas.compat._optional import import_optional_dependency
from pandas.errors import (
Pandas4Warning,
ParserError,
ParserWarning,
)
from pandas.util._exceptions import (
find_stack_lev... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/parsers/base_parser.py | pandas/io/parsers/base_parser.py | from __future__ import annotations
from collections import defaultdict
from copy import copy
import csv
from enum import Enum
import itertools
from typing import (
TYPE_CHECKING,
Any,
cast,
final,
overload,
)
import warnings
import numpy as np
from pandas._libs import (
lib,
parsers,
)
im... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | true |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/parsers/__init__.py | pandas/io/parsers/__init__.py | from pandas.io.parsers.readers import (
TextFileReader,
TextParser,
read_csv,
read_fwf,
read_table,
)
__all__ = ["TextFileReader", "TextParser", "read_csv", "read_fwf", "read_table"]
| python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/parsers/readers.py | pandas/io/parsers/readers.py | """
Module contains tools for processing files into DataFrames or other objects
GH#48849 provides a convenient way of deprecating keyword arguments
"""
from __future__ import annotations
from collections import (
abc,
defaultdict,
)
import csv
import sys
from typing import (
IO,
TYPE_CHECKING,
An... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | true |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/pandas/io/parsers/python_parser.py | pandas/io/parsers/python_parser.py | from __future__ import annotations
from collections import (
abc,
defaultdict,
)
import csv
from io import StringIO
import re
from typing import (
IO,
TYPE_CHECKING,
Any,
DefaultDict,
Literal,
cast,
final,
)
import warnings
import numpy as np
from pandas._libs import lib
from pand... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | true |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/doc/make.py | doc/make.py | #!/usr/bin/env python3
"""
Python script for building documentation.
To build the docs you must have all optional dependencies for pandas
installed. See the installation instructions for a list of these.
Usage
-----
$ python make.py clean
$ python make.py html
$ python make.py latex
"""
import argparse
i... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/doc/scripts/eval_performance.py | doc/scripts/eval_performance.py | from timeit import repeat as timeit
import numpy as np
import seaborn as sns
from pandas import DataFrame
setup_common = """from pandas import DataFrame
import numpy as np
df = DataFrame(np.random.randn(%d, 3), columns=list('abc'))
%s"""
setup_with = "s = 'a + b * (c ** 2 + b ** 2 - a) / (a * c) ** 3'"
def bench_... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/doc/source/conf.py | doc/source/conf.py | #
# pandas documentation build configuration file, created by
#
# This file is execfile()d with the current directory set to its containing
# dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# se... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/doc/sphinxext/announce.py | doc/sphinxext/announce.py | #!/usr/bin/env python3
"""
Script to generate contributor and pull request lists
This script generates contributor and pull request lists for release
announcements using GitHub v3 protocol. Use requires an authentication token in
order to have sufficient bandwidth, you can get one following the directions at
`<https:/... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/doc/sphinxext/contributors.py | doc/sphinxext/contributors.py | """Sphinx extension for listing code contributors to a release.
Usage::
.. contributors:: v0.23.0..v0.23.1
This will be replaced with a message indicating the number of
code contributors and commits, and then list each contributor
individually. For development versions (before a tag is available)
use::
.. co... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/web/pandas_web.py | web/pandas_web.py | #!/usr/bin/env python3
"""
Simple static site generator for the pandas web.
pandas_web.py takes a directory as parameter, and copies all the files into the
target directory after converting markdown files into html and rendering both
markdown and html files with a context. The context is obtained by parsing
the file `... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
pandas-dev/pandas | https://github.com/pandas-dev/pandas/blob/91514c363604506f447e53380d3aa00520f1037b/web/tests/test_pandas_web.py | web/tests/test_pandas_web.py | from unittest.mock import ( # noqa: TID251
mock_open,
patch,
)
import pytest
import requests
from web.pandas_web import Preprocessors
class MockResponse:
def __init__(self, status_code: int, response: dict) -> None:
self.status_code = status_code
self._resp = response
def json(self... | python | BSD-3-Clause | 91514c363604506f447e53380d3aa00520f1037b | 2026-01-04T14:39:36.002480Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/setup.py | setup.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
"""
DeepSpeed library
To build wheels on Windows:
1. Install pytorch, such as pytorch 2.3 + cuda 12.1.
2. Install visual cpp build tool.
3. Include cuda toolkit.
4. Launch cmd console with Administrator privilege for creatin... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/scripts/check-torchcuda.py | scripts/check-torchcuda.py | #!/usr/bin/env python3
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
from __future__ import annotations
'''Copyright The Microsoft DeepSpeed Team'''
"""
Checks each file in sys.argv for the string "torch.cuda".
Modified from https://github.com/jlebar/pre-commit-hooks/bl... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/scripts/check-torchdist.py | scripts/check-torchdist.py | #!/usr/bin/env python3
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
from __future__ import annotations
'''Copyright The Microsoft DeepSpeed Team'''
"""
Checks each file in sys.argv for the string "torch.distributed".
Modified from https://github.com/jlebar/pre-commit-h... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/scripts/check-extraindexurl.py | scripts/check-extraindexurl.py | #!/usr/bin/env python3
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
from __future__ import annotations
'''Copyright The Microsoft DeepSpeed Team'''
"""
Checks each file in sys.argv for the string "--extra-index-url".
Modified from https://github.com/jlebar/pre-commit-h... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/scripts/replace_copyright.py | scripts/replace_copyright.py | #!/usr/bin/env python3
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
"""
USAGE:
$ python3 script/replace_copyright.py --repo_dir ./
"""
import os
import argparse
NEW_COPYRIGHT = ("Copyright (c) Microsoft Corporation.", "SPDX-License-Identifier: Apache-2.0", "", "DeepSp... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/scripts/check-license.py | scripts/check-license.py | #!/usr/bin/env python3
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
from __future__ import annotations
'''Copyright The Microsoft DeepSpeed Team'''
"""
Modified from https://github.com/jlebar/pre-commit-hooks/blob/master/check_do_not_submit.py
"""
import subprocess
im... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/release/bump_patch_version.py | release/bump_patch_version.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
import argparse
from packaging import version as pkg_version
parser = argparse.ArgumentParser()
parser.add_argument("--current_version",
type=str,
help="The current version being pub... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/release/check_release_version.py | release/check_release_version.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
import argparse
from packaging import version as pkg_version
parser = argparse.ArgumentParser()
parser.add_argument("--release_version", type=str, help="The new version being published.")
args = parser.parse_args()
relea... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/cpu_lion.py | op_builder/cpu_lion.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
from .builder import TorchCPUOpBuilder
class CPULionBuilder(TorchCPUOpBuilder):
BUILD_VAR = "DS_BUILD_CPU_LION"
NAME = "cpu_lion"
def __init__(self):
super().__init__(name=self.NAME)
def absolute_... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/sparse_attn.py | op_builder/sparse_attn.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
from .builder import OpBuilder
try:
from packaging import version as pkg_version
except ImportError:
pkg_version = None
class SparseAttnBuilder(OpBuilder):
BUILD_VAR = "DS_BUILD_SPARSE_ATTN"
NAME = "sparse... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/fused_lamb.py | op_builder/fused_lamb.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
from .builder import CUDAOpBuilder
import sys
class FusedLambBuilder(CUDAOpBuilder):
BUILD_VAR = 'DS_BUILD_FUSED_LAMB'
NAME = "fused_lamb"
def __init__(self):
super().__init__(name=self.NAME)
def... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/cpu_adagrad.py | op_builder/cpu_adagrad.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
from .builder import TorchCPUOpBuilder
class CPUAdagradBuilder(TorchCPUOpBuilder):
BUILD_VAR = "DS_BUILD_CPU_ADAGRAD"
NAME = "cpu_adagrad"
def __init__(self):
super().__init__(name=self.NAME)
def ... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/async_io.py | op_builder/async_io.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
import os
import shutil
import subprocess
from .builder import TorchCPUOpBuilder
class AsyncIOBuilder(TorchCPUOpBuilder):
BUILD_VAR = "DS_BUILD_AIO"
NAME = "async_io"
def __init__(self):
super().__ini... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/dc.py | op_builder/dc.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
from .builder import TorchCPUOpBuilder
class DeepCompileBuilder(TorchCPUOpBuilder):
BUILD_VAR = "DS_BUILD_DEEP_COMPILE"
NAME = "dc"
def __init__(self):
super().__init__(name=self.NAME)
def absolut... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/fused_lion.py | op_builder/fused_lion.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
from .builder import CUDAOpBuilder
import sys
class FusedLionBuilder(CUDAOpBuilder):
BUILD_VAR = "DS_BUILD_FUSED_LION"
NAME = "fused_lion"
def __init__(self):
super().__init__(name=self.NAME)
def... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/stochastic_transformer.py | op_builder/stochastic_transformer.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
from .transformer import TransformerBuilder
class StochasticTransformerBuilder(TransformerBuilder):
BUILD_VAR = "DS_BUILD_STOCHASTIC_TRANSFORMER"
NAME = "stochastic_transformer"
def __init__(self):
sup... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/ragged_utils.py | op_builder/ragged_utils.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
import os
from .builder import CUDAOpBuilder, installed_cuda_version
class RaggedUtilsBuilder(CUDAOpBuilder):
BUILD_VAR = "DS_BUILD_RAGGED_OPS"
NAME = "ragged_ops"
def __init__(self, name=None):
name ... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/transformer_inference.py | op_builder/transformer_inference.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
from .builder import CUDAOpBuilder, installed_cuda_version
class InferenceBuilder(CUDAOpBuilder):
BUILD_VAR = "DS_BUILD_TRANSFORMER_INFERENCE"
NAME = "transformer_inference"
def __init__(self, name=None):
... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/ragged_ops.py | op_builder/ragged_ops.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
import os
from .builder import CUDAOpBuilder, installed_cuda_version
class RaggedOpsBuilder(CUDAOpBuilder):
BUILD_VAR = "DS_BUILD_RAGGED_DEVICE_OPS"
NAME = "ragged_device_ops"
def __init__(self, name=None):
... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/fused_adam.py | op_builder/fused_adam.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
from .builder import CUDAOpBuilder
import sys
class FusedAdamBuilder(CUDAOpBuilder):
BUILD_VAR = "DS_BUILD_FUSED_ADAM"
NAME = "fused_adam"
def __init__(self):
super().__init__(name=self.NAME)
def... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/fp_quantizer.py | op_builder/fp_quantizer.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
try:
from packaging import version as pkg_version
except ImportError:
pkg_version = None
from .builder import CUDAOpBuilder, installed_cuda_version
class FPQuantizerBuilder(CUDAOpBuilder):
BUILD_VAR = "DS_BUIL... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/utils.py | op_builder/utils.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
from .builder import OpBuilder
class UtilsBuilder(OpBuilder):
BUILD_VAR = "DS_BUILD_UTILS"
NAME = "utils"
def __init__(self):
super().__init__(name=self.NAME)
def absolute_name(self):
retu... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/random_ltd.py | op_builder/random_ltd.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
from .builder import CUDAOpBuilder
class RandomLTDBuilder(CUDAOpBuilder):
BUILD_VAR = "DS_BUILD_RANDOM_LTD"
NAME = "random_ltd"
def __init__(self, name=None):
name = self.NAME if name is None else name... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/inference_core_ops.py | op_builder/inference_core_ops.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
import os
from .builder import CUDAOpBuilder, installed_cuda_version
class InferenceCoreBuilder(CUDAOpBuilder):
BUILD_VAR = "DS_BUILD_INFERENCE_CORE_OPS"
NAME = "inference_core_ops"
def __init__(self, name=No... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/__init__.py | op_builder/__init__.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
import sys
import os
import pkgutil
import importlib
from .builder import get_default_compute_capabilities, OpBuilder
# Do not remove, required for abstract accelerator to detect if we have a deepspeed or 3p op_builder
__d... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/spatial_inference.py | op_builder/spatial_inference.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
from .builder import CUDAOpBuilder, installed_cuda_version
class SpatialInferenceBuilder(CUDAOpBuilder):
BUILD_VAR = "DS_BUILD_SPATIAL_INFERENCE"
NAME = "spatial_inference"
def __init__(self, name=None):
... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/builder.py | op_builder/builder.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
import os
import re
import sys
import time
import importlib
from pathlib import Path
import subprocess
import shlex
import shutil
import tempfile
import distutils.ccompiler
import distutils.log
import distutils.sysconfig
fro... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | true |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/inference_cutlass_builder.py | op_builder/inference_cutlass_builder.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
import os
from .builder import CUDAOpBuilder, installed_cuda_version
class InferenceCutlassBuilder(CUDAOpBuilder):
BUILD_VAR = "DS_BUILD_CUTLASS_OPS"
NAME = "cutlass_ops"
def __init__(self, name=None):
... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/transformer.py | op_builder/transformer.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
from .builder import CUDAOpBuilder
class TransformerBuilder(CUDAOpBuilder):
BUILD_VAR = "DS_BUILD_TRANSFORMER"
NAME = "transformer"
def __init__(self, name=None):
name = self.NAME if name is None else ... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/all_ops.py | op_builder/all_ops.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
import os
import pkgutil
import importlib
try:
# during installation time accelerator is visible, otherwise return deepspeed.accelerator
from accelerator import get_accelerator
except ImportError:
from deepspeed.... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/evoformer_attn.py | op_builder/evoformer_attn.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
from .builder import CUDAOpBuilder, installed_cuda_version
import os
class EvoformerAttnBuilder(CUDAOpBuilder):
BUILD_VAR = "DS_BUILD_EVOFORMER_ATTN"
NAME = "evoformer_attn"
def __init__(self, name=None):
... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/quantizer.py | op_builder/quantizer.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
from .builder import CUDAOpBuilder
class QuantizerBuilder(CUDAOpBuilder):
BUILD_VAR = "DS_BUILD_QUANTIZER"
NAME = "quantizer"
def __init__(self, name=None):
name = self.NAME if name is None else name
... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/gds.py | op_builder/gds.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
import os
from .async_io import AsyncIOBuilder
class GDSBuilder(AsyncIOBuilder):
BUILD_VAR = "DS_BUILD_GDS"
NAME = "gds"
def __init__(self):
super().__init__()
def absolute_name(self):
ret... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
deepspeedai/DeepSpeed | https://github.com/deepspeedai/DeepSpeed/blob/2390bc5c4128b4c347be522a2b2d0f109c7879f3/op_builder/cpu_adam.py | op_builder/cpu_adam.py | # Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
from .builder import TorchCPUOpBuilder
class CPUAdamBuilder(TorchCPUOpBuilder):
BUILD_VAR = "DS_BUILD_CPU_ADAM"
NAME = "cpu_adam"
def __init__(self):
super().__init__(name=self.NAME)
def absolute_... | python | Apache-2.0 | 2390bc5c4128b4c347be522a2b2d0f109c7879f3 | 2026-01-04T14:40:27.668296Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.