repo_id stringlengths 21 96 | file_path stringlengths 31 155 | content stringlengths 1 92.9M | __index_level_0__ int64 0 0 |
|---|---|---|---|
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/core/column_accessor.py | # Copyright (c) 2021-2023, NVIDIA CORPORATION.
from __future__ import annotations
import itertools
import warnings
from collections import abc
from functools import cached_property, reduce
from typing import (
TYPE_CHECKING,
Any,
Callable,
Dict,
Mapping,
Optional,
Tuple,
Union,
)
impo... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/core/abc.py | # Copyright (c) 2020-2022, NVIDIA CORPORATION.
"""Common abstract base classes for cudf."""
import pickle
import numpy
import cudf
class Serializable:
"""A serializable object composed of device memory buffers.
This base class defines a standard serialization protocol for objects
encapsulating device ... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/core/scalar.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
import decimal
import operator
from collections import OrderedDict
import numpy as np
import pyarrow as pa
import cudf
from cudf.api.types import is_datetime64_dtype, is_scalar, is_timedelta64_dtype
from cudf.core.dtypes import ListDtype, StructDtype
from cudf.core.miss... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/core/_compat.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
import pandas as pd
from packaging import version
PANDAS_VERSION = version.parse(pd.__version__)
PANDAS_GE_133 = PANDAS_VERSION >= version.parse("1.3.3")
PANDAS_GE_134 = PANDAS_VERSION >= version.parse("1.3.4")
PANDAS_LT_140 = PANDAS_VERSION < version.parse("1.4.0")
PAND... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/core/reshape.py | # Copyright (c) 2018-2023, NVIDIA CORPORATION.
import itertools
import warnings
from collections import abc
from typing import Dict, Optional
import cupy
import numpy as np
import pandas as pd
import cudf
from cudf._lib.transform import one_hot_encode
from cudf._lib.types import size_type_dtype
from cudf._typing imp... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/core/multiindex.py | # Copyright (c) 2019-2023, NVIDIA CORPORATION.
from __future__ import annotations
import itertools
import numbers
import operator
import pickle
import warnings
from collections import abc
from functools import cached_property
from numbers import Integral
from typing import Any, List, MutableMapping, Tuple, Union
imp... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/core/index.py | # Copyright (c) 2018-2023, NVIDIA CORPORATION.
from __future__ import annotations
import math
import pickle
import warnings
from functools import cache, cached_property
from numbers import Number
from typing import (
Any,
Dict,
List,
MutableMapping,
Optional,
Sequence,
Tuple,
Type,
... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/core/single_column_frame.py | # Copyright (c) 2021-2023, NVIDIA CORPORATION.
"""Base class for Frame types that only have a single column."""
from __future__ import annotations
import warnings
from typing import Any, Dict, Optional, Tuple, Union
import cupy
import numpy
import cudf
from cudf._typing import Dtype, NotImplementedType, ScalarLike
... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/core/copy_types.py | # Copyright (c) 2023, NVIDIA CORPORATION.
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, cast
from typing_extensions import Self
import cudf
import cudf._lib as libcudf
from cudf._lib.types import size_type_dtype
if TYPE_CHECKING:
from cudf.core.column import NumericalColumn
@dataclas... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/core/__init__.py | # Copyright (c) 2018-2021, NVIDIA CORPORATION.
| 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/core/tokenize_vocabulary.py | # Copyright (c) 2023, NVIDIA CORPORATION.
from __future__ import annotations
import cudf
from cudf._lib.nvtext.tokenize import (
TokenizeVocabulary as cpp_tokenize_vocabulary,
tokenize_with_vocabulary as cpp_tokenize_with_vocabulary,
)
class TokenizeVocabulary:
"""
A vocabulary object used to tokeni... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/core/cut.py | # Copyright (c) 2021-2023, NVIDIA CORPORATION.
from collections import abc
import cupy
import numpy as np
import pandas as pd
import cudf
from cudf.api.types import is_list_like
from cudf.core.column import as_column, build_categorical_column
from cudf.core.index import IntervalIndex, interval_range
def cut(
x... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/core/indexed_frame.py | # Copyright (c) 2021-2023, NVIDIA CORPORATION.
"""Base class for Frame types that have an index."""
from __future__ import annotations
import numbers
import operator
import textwrap
import warnings
from collections import Counter, abc
from functools import cached_property
from typing import (
Any,
Callable,
... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/core/resample.py | # SPDX-FileCopyrightText: Copyright (c) 2021-2023, NVIDIA CORPORATION &
# AFFILIATES. All rights reserved. SPDX-License-Identifier:
# Apache-2.0
#
# 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 ... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/core/_base_index.py | # Copyright (c) 2021-2023, NVIDIA CORPORATION.
from __future__ import annotations
import builtins
import pickle
import warnings
from functools import cached_property
from typing import Any, Set, Tuple
import pandas as pd
from typing_extensions import Self
import cudf
from cudf._lib.copying import _gather_map_is_val... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/core/algorithms.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
import warnings
import cupy as cp
import numpy as np
from cudf.core.column import as_column
from cudf.core.copy_types import BooleanMask
from cudf.core.index import RangeIndex, as_index
from cudf.core.indexed_frame import IndexedFrame
from cudf.core.scalar import Scalar
... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/core/dtypes.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
import decimal
import operator
import pickle
import textwrap
from functools import cached_property
from typing import Any, Callable, Dict, List, Tuple, Type, Union
import numpy as np
import pandas as pd
import pyarrow as pa
from pandas.api import types as pd_types
from p... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/udf/row_function.py | # Copyright (c) 2021-2023, NVIDIA CORPORATION.
import math
import numpy as np
from numba import cuda
from numba.np import numpy_support
from cudf.core.udf.api import Masked, pack_return
from cudf.core.udf.masked_typing import MaskedType
from cudf.core.udf.strings_typing import string_view
from cudf.core.udf.templates... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/udf/_ops.py | # Copyright (c) 2021-2022, NVIDIA CORPORATION.
import math
import operator
arith_ops = [
operator.add,
operator.sub,
operator.mul,
operator.truediv,
operator.floordiv,
operator.mod,
operator.pow,
operator.iadd,
operator.isub,
operator.imul,
operator.itruediv,
operator.f... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/udf/scalar_function.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
from numba import cuda
from numba.np import numpy_support
from cudf.core.udf.api import Masked, pack_return
from cudf.core.udf.masked_typing import MaskedType
from cudf.core.udf.strings_typing import string_view
from cudf.core.udf.templates import (
masked_input_init... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/udf/templates.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
unmasked_input_initializer_template = """\
d_{idx} = input_col_{idx}
masked_{idx} = Masked(d_{idx}[i], True)
"""
masked_input_initializer_template = """\
d_{idx}, m_{idx} = input_col_{idx}
masked_{idx} = Masked(d_{idx}[i], _mask_get(m_{idx... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/udf/masked_lowering.py | # Copyright (c) 2021-2023, NVIDIA CORPORATION.
import operator
from llvmlite import ir
from numba.core import cgutils
from numba.core.typing import signature as nb_signature
from numba.cuda.cudaimpl import (
lower as cuda_lower,
registry as cuda_lowering_registry,
)
from numba.extending import lower_builtin, ... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/udf/groupby_typing.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
from typing import Any, Dict
import numba
from numba import cuda, types
from numba.core.extending import (
make_attribute_wrapper,
models,
register_model,
type_callable,
typeof_impl,
)
from numba.core.typing import signature as nb_signature
from numba.... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/udf/api.py | # Copyright (c) 2021-2022, NVIDIA CORPORATION.
class Masked:
"""
Most of the time, MaskedType as defined in typing.py
combined with the ops defined to operate on them are
enough to fulfill the obligations of DataFrame.apply
However sometimes we need to refer to an instance of
a masked scalar o... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/udf/groupby_lowering.py | # Copyright (c) 2022-2023, NVIDIA CORPORATION.
from functools import partial
from numba import types
from numba.core import cgutils
from numba.core.extending import lower_builtin
from numba.core.typing import signature as nb_signature
from numba.cuda.cudaimpl import lower as cuda_lower
from cudf.core.udf.groupby_typ... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/udf/strings_lowering.py | # Copyright (c) 2022-2023, NVIDIA CORPORATION.
import operator
from functools import partial
from numba import cuda, types
from numba.core import cgutils
from numba.core.datamodel import default_manager
from numba.core.typing import signature as nb_signature
from numba.cuda.cudaimpl import (
lower as cuda_lower,
... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/udf/groupby_utils.py | # Copyright (c) 2022-2023, NVIDIA CORPORATION.
import cupy as cp
import numpy as np
from numba import cuda, types
from numba.core.errors import TypingError
from numba.cuda.cudadrv.devices import get_context
from numba.np import numpy_support
import cudf.core.udf.utils
from cudf.core.udf.groupby_typing import (
S... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/udf/__init__.py | # Copyright (c) 2022-2023, NVIDIA CORPORATION.
from . import (
groupby_lowering,
groupby_typing,
masked_lowering,
masked_typing,
strings_lowering,
strings_typing,
)
| 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/udf/utils.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
import os
from typing import Any, Callable, Dict
import cachetools
import cupy as cp
import llvmlite.binding as ll
import numpy as np
from cuda import cudart
from numba import cuda, typeof
from numba.core.datamodel import default_manager, models
from numba.core.errors im... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/udf/strings_typing.py | # Copyright (c) 2022-2023, NVIDIA CORPORATION.
import operator
import numpy as np
from numba import types
from numba.core.extending import models, register_model
from numba.core.typing import signature as nb_signature
from numba.core.typing.templates import AbstractTemplate, AttributeTemplate
from numba.cuda.cudadecl... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/udf/masked_typing.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
import operator
import numpy as np
from numba import types
from numba.core.extending import (
make_attribute_wrapper,
models,
register_model,
typeof_impl,
)
from numba.core.typing import signature as nb_signature
from numba.core.typing.templates import (
... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/window/rolling.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION
import itertools
import numba
import pandas as pd
from pandas.api.indexers import BaseIndexer
import cudf
from cudf import _lib as libcudf
from cudf.api.types import is_integer, is_number
from cudf.core import column
from cudf.core._compat import PANDAS_GE_150
from cudf.... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/window/__init__.py | # Copyright (c) 2019-2022, NVIDIA CORPORATION
from cudf.core.window.rolling import Rolling
| 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/_internals/where.py | # Copyright (c) 2021-2023, NVIDIA CORPORATION.
import warnings
from typing import Tuple, Union
import numpy as np
import cudf
from cudf._typing import ScalarLike
from cudf.api.types import (
_is_non_decimal_numeric_dtype,
is_bool_dtype,
is_categorical_dtype,
is_scalar,
)
from cudf.core.column import ... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/_internals/timezones.py | # Copyright (c) 2023, NVIDIA CORPORATION.
import os
import zoneinfo
from functools import lru_cache
from typing import Tuple, cast
import numpy as np
import pandas as pd
import cudf
from cudf._lib.labeling import label_bins
from cudf._lib.search import search_sorted
from cudf._lib.timezone import make_timezone_trans... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/_internals/expressions.py | # Copyright (c) 2022-2023, NVIDIA CORPORATION.
import ast
import functools
from typing import List, Tuple
from cudf._lib.expressions import (
ASTOperator,
ColumnReference,
Expression,
Literal,
Operation,
)
# This dictionary encodes the mapping from Python AST operators to their cudf
# counterpart... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/_internals/__init__.py | # Copyright (c) 2021, NVIDIA CORPORATION.
| 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/buffer/spillable_buffer.py | # Copyright (c) 2022-2023, NVIDIA CORPORATION.
from __future__ import annotations
import collections.abc
import pickle
import time
import weakref
from threading import RLock
from typing import TYPE_CHECKING, Any, Dict, List, Literal, Optional, Tuple
import numpy
from typing_extensions import Self
import rmm
from c... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/buffer/buffer.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
from __future__ import annotations
import math
import pickle
from types import SimpleNamespace
from typing import Any, Dict, Literal, Mapping, Optional, Sequence, Tuple
import numpy
from typing_extensions import Self
import rmm
import cudf
from cudf.core.abc import Se... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/buffer/exposure_tracked_buffer.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
from __future__ import annotations
import weakref
from typing import (
Any,
Container,
Literal,
Mapping,
Optional,
Type,
TypeVar,
cast,
)
from typing_extensions import Self
import cudf
from cudf.core.buffer.buffer import Buffer, get_ptr_... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/buffer/__init__.py | # Copyright (c) 2022-2023, NVIDIA CORPORATION.
from cudf.core.buffer.buffer import Buffer, cuda_array_interface_wrapper
from cudf.core.buffer.exposure_tracked_buffer import ExposureTrackedBuffer
from cudf.core.buffer.spillable_buffer import SpillableBuffer, SpillLock
from cudf.core.buffer.utils import (
acquire_sp... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/buffer/utils.py | # Copyright (c) 2022-2023, NVIDIA CORPORATION.
from __future__ import annotations
import threading
from contextlib import ContextDecorator
from typing import Any, Dict, Optional, Tuple, Union
from cudf.core.buffer.buffer import Buffer, cuda_array_interface_wrapper
from cudf.core.buffer.exposure_tracked_buffer import... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/buffer/spill_manager.py | # Copyright (c) 2022-2023, NVIDIA CORPORATION.
from __future__ import annotations
import gc
import io
import textwrap
import threading
import traceback
import warnings
import weakref
from collections import defaultdict
from dataclasses import dataclass
from functools import partial
from typing import Dict, List, Opti... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/tools/datetimes.py | # Copyright (c) 2019-2023, NVIDIA CORPORATION.
import math
import re
import warnings
from typing import Sequence, Union
import cupy as cp
import numpy as np
import pandas as pd
import pandas.tseries.offsets as pd_offset
from pandas.core.tools.datetimes import _unit_map
from typing_extensions import Self
import cudf
... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/tools/numeric.py | # Copyright (c) 2018-2022, NVIDIA CORPORATION.
import warnings
import numpy as np
import pandas as pd
import cudf
from cudf import _lib as libcudf
from cudf._lib import strings as libstrings
from cudf.api.types import (
_is_non_decimal_numeric_dtype,
is_categorical_dtype,
is_datetime_dtype,
is_list_d... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/groupby/groupby.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
import copy
import itertools
import pickle
import textwrap
import warnings
from collections import abc
from functools import cached_property
from typing import Any, Iterable, List, Optional, Tuple, Union
import cupy as cp
import numpy as np
import pandas as pd
import cu... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/groupby/__init__.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
from cudf.core.groupby.groupby import GroupBy, Grouper
__all__ = [
"GroupBy",
"Grouper",
]
| 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/join/join.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
from __future__ import annotations
import itertools
import warnings
from typing import Any, ClassVar, List, Optional
import cudf
from cudf import _lib as libcudf
from cudf._lib.types import size_type_dtype
from cudf.core.copy_types import GatherMap
from cudf.core.join._j... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/join/_join_helpers.py | # Copyright (c) 2021-2023, NVIDIA CORPORATION.
from __future__ import annotations
from collections import abc
from typing import TYPE_CHECKING, Any, Tuple, cast
import numpy as np
import cudf
from cudf.api.types import is_decimal_dtype, is_dtype_equal
from cudf.core.column import CategoricalColumn
from cudf.core.dt... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/join/__init__.py | # Copyright (c) 2020-2021, NVIDIA CORPORATION.
from cudf.core.join.join import Merge, MergeSemi
| 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/mixins/binops.pyi | # Copyright (c) 2022, NVIDIA CORPORATION.
from typing import Any, Set, Tuple, TypeVar
# Note: It may be possible to define a narrower bound here eventually.
BinaryOperandType = TypeVar("BinaryOperandType", bound="Any")
class BinaryOperand:
_SUPPORTED_BINARY_OPERATIONS: Set
def _binaryop(self, other: BinaryO... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/mixins/reductions.py | # Copyright (c) 2022, NVIDIA CORPORATION.
from .mixin_factory import _create_delegating_mixin
Reducible = _create_delegating_mixin(
"Reducible",
"Mixin encapsulating reduction operations.",
"REDUCTION",
"_reduce",
{
"sum",
"product",
"min",
"max",
"count",
... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/mixins/scans.pyi | # Copyright (c) 2022, NVIDIA CORPORATION.
from typing import Set
class Scannable:
_SUPPORTED_SCANS: Set
def cumsum(self): ...
def cumprod(self): ...
def cummin(self): ...
def cummax(self): ...
| 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/mixins/reductions.pyi | # Copyright (c) 2022, NVIDIA CORPORATION.
from typing import Set
class Reducible:
_SUPPORTED_REDUCTIONS: Set
def sum(self): ...
def product(self): ...
def min(self): ...
def max(self): ...
def count(self): ...
def any(self): ...
def all(self): ...
def sum_of_squares(self): ...
... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/mixins/scans.py | # Copyright (c) 2022, NVIDIA CORPORATION.
from .mixin_factory import _create_delegating_mixin
Scannable = _create_delegating_mixin(
"Scannable",
"Mixin encapsulating scan operations.",
"SCAN",
"_scan",
{
"cumsum",
"cumprod",
"cummin",
"cummax",
}, # noqa: E231
... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/mixins/mixin_factory.py | # Copyright (c) 2022, NVIDIA CORPORATION.
import inspect
# `functools.partialmethod` does not allow setting attributes such as
# __doc__ on the resulting method. So we use a simple alternative to
# it here:
def _partialmethod(method, *args1, **kwargs1):
def wrapper(self, *args2, **kwargs2):
return method... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/mixins/binops.py | # Copyright (c) 2022, NVIDIA CORPORATION.
from .mixin_factory import _create_delegating_mixin
BinaryOperand = _create_delegating_mixin(
"BinaryOperand",
"Mixin encapsulating binary operations.",
"BINARY_OPERATION",
"_binaryop",
{
# Numeric operations.
"__add__",
"__sub__",
... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/mixins/__init__.py | # Copyright (c) 2022, NVIDIA CORPORATION.
from .binops import BinaryOperand
from .reductions import Reducible
from .scans import Scannable
__all__ = ["BinaryOperand", "Reducible", "Scannable"]
| 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/column/categorical.py | # Copyright (c) 2018-2023, NVIDIA CORPORATION.
from __future__ import annotations
import warnings
from collections import abc
from functools import cached_property
from typing import TYPE_CHECKING, Any, Mapping, Optional, Sequence, Tuple, cast
import numpy as np
import pandas as pd
import pyarrow as pa
from numba im... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/column/string.py | # Copyright (c) 2019-2023, NVIDIA CORPORATION.
from __future__ import annotations
import re
import warnings
from functools import cached_property
from typing import (
TYPE_CHECKING,
Any,
Optional,
Sequence,
Tuple,
Union,
cast,
overload,
)
import cupy
import numpy as np
import pandas a... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/column/decimal.py | # Copyright (c) 2021-2023, NVIDIA CORPORATION.
import warnings
from decimal import Decimal
from typing import Any, Optional, Sequence, Union, cast
import cupy as cp
import numpy as np
import pyarrow as pa
import cudf
from cudf import _lib as libcudf
from cudf._lib.strings.convert.convert_fixed_point import (
fro... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/column/datetime.py | # Copyright (c) 2019-2023, NVIDIA CORPORATION.
from __future__ import annotations
import datetime
import locale
import re
from locale import nl_langinfo
from typing import Any, Mapping, Optional, Sequence, cast
import numpy as np
import pandas as pd
import pyarrow as pa
import cudf
from cudf import _lib as libcudf
... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/column/column.py | # Copyright (c) 2018-2023, NVIDIA CORPORATION.
from __future__ import annotations
import builtins
import pickle
from collections import abc
from functools import cached_property
from itertools import chain
from types import SimpleNamespace
from typing import (
Any,
Dict,
List,
MutableSequence,
Opt... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/column/struct.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
from __future__ import annotations
from functools import cached_property
from typing import Optional
import pandas as pd
import pyarrow as pa
import cudf
from cudf._typing import Dtype
from cudf.api.types import is_struct_dtype
from cudf.core.column import ColumnBase, b... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/column/lists.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
from functools import cached_property
from typing import List, Optional, Sequence, Tuple, Union
import numpy as np
import pyarrow as pa
from typing_extensions import Self
import cudf
from cudf._lib.copying import segmented_gather
from cudf._lib.lists import (
concat... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/column/methods.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
from __future__ import annotations
from typing import Optional, Union, overload
from typing_extensions import Literal
import cudf
from cudf.utils.utils import NotIterable
ParentType = Union["cudf.Series", "cudf.core.index.GenericIndex"]
class ColumnMethods(NotIterab... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/column/timedelta.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
from __future__ import annotations
import datetime
from typing import Any, Optional, Sequence, cast
import numpy as np
import pandas as pd
import pyarrow as pa
import cudf
from cudf import _lib as libcudf
from cudf._typing import ColumnBinaryOperand, DatetimeLikeScalar... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/column/interval.py | # Copyright (c) 2018-2023, NVIDIA CORPORATION.
from typing import Optional
import pandas as pd
import pyarrow as pa
import cudf
from cudf.api.types import is_categorical_dtype, is_interval_dtype
from cudf.core.column import StructColumn
from cudf.core.dtypes import IntervalDtype
class IntervalColumn(StructColumn):
... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/column/numerical_base.py | # Copyright (c) 2018-2023, NVIDIA CORPORATION.
"""Define an interface for columns that can perform numerical operations."""
from __future__ import annotations
from typing import Optional, cast
import numpy as np
import cudf
from cudf import _lib as libcudf
from cudf._typing import ScalarLike
from cudf.core.column i... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/column/__init__.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
"""
isort: skip_file
"""
from cudf.core.column.categorical import CategoricalColumn
from cudf.core.column.column import (
ColumnBase,
arange,
as_column,
build_categorical_column,
build_column,
build_list_column,
build_struct_column,
colum... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/core | rapidsai_public_repos/cudf/python/cudf/cudf/core/column/numerical.py | # Copyright (c) 2018-2023, NVIDIA CORPORATION.
from __future__ import annotations
from typing import (
Any,
Callable,
Mapping,
Optional,
Sequence,
Tuple,
Union,
cast,
)
import cupy as cp
import numpy as np
import pandas as pd
import cudf
from cudf import _lib as libcudf
from cudf._li... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/benchmarks/bench_cudf_io.py | # Copyright (c) 2020, NVIDIA CORPORATION.
import glob
import io
import pytest
from conftest import option
import cudf
def get_dataset_dir():
if option.dataset_dir == "NONE":
return "cudf/benchmarks/cuio_data/datasets/"
return option.dataset_dir
@pytest.mark.parametrize("skiprows", [None, 100000, ... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/benchmarks/README.md | # cuDF benchmarks
## Overview
This directory contains source and configuration files for benchmarking
`cuDF`. The sources are currently intended to benchmark `cuDF` via the
python API, but this is not a requirement.
## Prerequisites
### Datasets
* Download datasets using `get_datasets.sh` shell file. Currently there... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/benchmarks/conftest.py | # Copyright (c) 2020, NVIDIA CORPORATION.
option = None
def pytest_addoption(parser):
parser.addoption("--use_buffer", action="store", default=False)
parser.addoption("--dataset_dir", action="store", default="NONE")
def pytest_generate_tests(metafunc):
# This is called for every test. Only get/set comma... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/benchmarks/get_datasets.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
import argparse
import os
import shutil
from collections import namedtuple
# Update url and dir where datasets needs to be copied
Dataset = namedtuple("Dataset", ["url", "dir"])
datasets = {
"cuio_dataset": Dataset(
"https://data.rapids.ai/cudf/benchmark/avro... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/quantiles.pyx | # Copyright (c) 2020-2022, NVIDIA CORPORATION.
from cudf.core.buffer import acquire_spill_lock
from libcpp cimport bool
from libcpp.memory cimport unique_ptr
from libcpp.utility cimport move
from libcpp.vector cimport vector
from cudf._lib.column cimport Column
from cudf._lib.types cimport (
underlying_type_t_in... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/merge.pyx | # Copyright (c) 2020-2022, NVIDIA CORPORATION.
from libcpp cimport bool
from libcpp.memory cimport unique_ptr
from libcpp.utility cimport move
from libcpp.vector cimport vector
cimport cudf._lib.cpp.types as libcudf_types
from cudf._lib.cpp.merge cimport merge as cpp_merge
from cudf._lib.cpp.table.table cimport table... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/null_mask.pyx | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
from enum import Enum
from rmm._lib.device_buffer cimport DeviceBuffer, device_buffer
from cudf.core.buffer import acquire_spill_lock, as_buffer
from libcpp.memory cimport make_unique, unique_ptr
from libcpp.pair cimport pair
from libcpp.utility cimport move
from cudf... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/string_casting.pyx | # Copyright (c) 2020-2022, NVIDIA CORPORATION.
from cudf._lib.column cimport Column
from cudf._lib.scalar import as_device_scalar
from cudf._lib.scalar cimport DeviceScalar
from cudf._lib.types import SUPPORTED_NUMPY_TO_LIBCUDF_TYPES
from libcpp.memory cimport unique_ptr
from libcpp.string cimport string
from libc... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/expressions.pyx | # Copyright (c) 2022-2023, NVIDIA CORPORATION.
from enum import Enum
from cython.operator cimport dereference
from libc.stdint cimport int64_t
from libcpp.memory cimport make_unique, unique_ptr
from libcpp.string cimport string
from libcpp.utility cimport move
from cudf._lib.cpp cimport expressions as libcudf_exp
fr... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/parquet.pyx | # Copyright (c) 2019-2023, NVIDIA CORPORATION.
# cython: boundscheck = False
import io
import pyarrow as pa
import cudf
from cudf.core.buffer import acquire_spill_lock
try:
import ujson as json
except ImportError:
import json
import numpy as np
from cython.operator cimport dereference
from cudf.api.type... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/sort.pyx | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
from itertools import repeat
from cudf.core.buffer import acquire_spill_lock
from libcpp cimport bool
from libcpp.memory cimport unique_ptr
from libcpp.utility cimport move, pair
from libcpp.vector cimport vector
from cudf._lib.column cimport Column
from cudf._lib.cpp.... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/text.pyx | # Copyright (c) 2020-2022, NVIDIA CORPORATION.
from io import TextIOBase
from cython.operator cimport dereference
from libc.stdint cimport uint64_t
from libcpp.memory cimport unique_ptr
from libcpp.string cimport string
from libcpp.utility cimport move
from cudf._lib.column cimport Column
from cudf._lib.cpp.column.c... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/csv.pyx | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
from libcpp cimport bool
from libcpp.map cimport map
from libcpp.memory cimport unique_ptr
from libcpp.string cimport string
from libcpp.utility cimport move
from libcpp.vector cimport vector
cimport cudf._lib.cpp.types as libcudf_types
from cudf._lib.cpp.types cimport d... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/utils.pxd | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
from libcpp.memory cimport unique_ptr
from libcpp.string cimport string
from libcpp.vector cimport vector
from cudf._lib.cpp.column.column cimport column_view
from cudf._lib.cpp.table.table cimport table, table_view
cdef vector[column_view] make_column_views(object col... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/aggregation.pxd | # Copyright (c) 2020-2022, NVIDIA CORPORATION.
from libcpp.memory cimport unique_ptr
from cudf._lib.cpp.aggregation cimport (
groupby_aggregation,
groupby_scan_aggregation,
reduce_aggregation,
rolling_aggregation,
scan_aggregation,
)
cdef class RollingAggregation:
cdef unique_ptr[rolling_agg... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/groupby.pyx | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
from pandas.core.groupby.groupby import DataError
from cudf.api.types import (
is_categorical_dtype,
is_decimal_dtype,
is_interval_dtype,
is_list_dtype,
is_string_dtype,
is_struct_dtype,
)
from cudf.core.buffer import acquire_spill_lock
from libc... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/types.pxd | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
from libc.stdint cimport int32_t
from libcpp cimport bool
cimport cudf._lib.cpp.types as libcudf_types
from cudf._lib.cpp.column.column_view cimport column_view
from cudf._lib.cpp.lists.lists_column_view cimport lists_column_view
ctypedef bool underlying_type_t_order
ct... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/interop.pyx | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
from cpython cimport pycapsule
from libcpp.memory cimport shared_ptr, unique_ptr
from libcpp.utility cimport move
from libcpp.vector cimport vector
from pyarrow.lib cimport CTable, pyarrow_unwrap_table, pyarrow_wrap_table
from cudf._lib.cpp.interop cimport (
DLManage... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/CMakeLists.txt | # =============================================================================
# Copyright (c) 2022-2023, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
#
# http://www.apa... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/reshape.pyx | # Copyright (c) 2019-2022, NVIDIA CORPORATION.
from cudf.core.buffer import acquire_spill_lock
from libcpp.memory cimport unique_ptr
from libcpp.utility cimport move
from cudf._lib.column cimport Column
from cudf._lib.cpp.column.column cimport column
from cudf._lib.cpp.reshape cimport (
interleave_columns as cpp... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/binaryop.pxd | # Copyright (c) 2020, NVIDIA CORPORATION.
from libc.stdint cimport int32_t
ctypedef int32_t underlying_type_t_binary_operator
| 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/types.pyx | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
from enum import IntEnum
import numpy as np
from libcpp.memory cimport make_shared, shared_ptr
cimport cudf._lib.cpp.types as libcudf_types
from cudf._lib.cpp.column.column_view cimport column_view
from cudf._lib.cpp.lists.lists_column_view cimport lists_column_view
fr... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/transpose.pyx | # Copyright (c) 2020-2022, NVIDIA CORPORATION.
from libcpp.memory cimport unique_ptr
from libcpp.pair cimport pair
from libcpp.utility cimport move
from cudf._lib.column cimport Column
from cudf._lib.cpp.column.column cimport column
from cudf._lib.cpp.table.table_view cimport table_view
from cudf._lib.cpp.transpose c... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/filling.pyx | # Copyright (c) 2020-2022, NVIDIA CORPORATION.
from cudf.core.buffer import acquire_spill_lock
from libcpp.memory cimport unique_ptr
from libcpp.utility cimport move
cimport cudf._lib.cpp.filling as cpp_filling
from cudf._lib.column cimport Column
from cudf._lib.cpp.column.column cimport column
from cudf._lib.cpp.co... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/scalar.pxd | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
from libcpp cimport bool
from libcpp.memory cimport unique_ptr
from rmm._lib.memory_resource cimport DeviceMemoryResource
# TODO: Would like to remove this cimport, but it will require some more work
# to excise all C code in scalar.pyx that relies on using the C API of... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/expressions.pxd | # Copyright (c) 2022-2023, NVIDIA CORPORATION.
from libc.stdint cimport int32_t, int64_t
from libcpp.memory cimport unique_ptr
from cudf._lib.cpp.expressions cimport (
column_reference,
expression,
literal,
operation,
)
from cudf._lib.cpp.scalar.scalar cimport numeric_scalar, scalar, string_scalar
c... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/reduce.pyx | # Copyright (c) 2020-2022, NVIDIA CORPORATION.
from cython.operator import dereference
import cudf
from cudf.core.buffer import acquire_spill_lock
from libcpp.memory cimport unique_ptr
from libcpp.utility cimport move, pair
from cudf._lib.aggregation cimport (
ReduceAggregation,
ScanAggregation,
make_re... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/transform.pyx | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
from numba.np import numpy_support
import cudf
from cudf._lib.types import SUPPORTED_NUMPY_TO_LIBCUDF_TYPES
from cudf.core._internals.expressions import parse_expression
from cudf.core.buffer import acquire_spill_lock, as_buffer
from cudf.utils import cudautils
from cyt... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_lib/copying.pxd | # Copyright (c) 2021-2023, NVIDIA CORPORATION.
from cudf._lib.cpp.contiguous_split cimport packed_columns
cdef class _CPackedColumns:
cdef packed_columns c_obj
cdef object column_names
cdef object column_dtypes
cdef object index_names
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.