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/api/types.py | # Copyright (c) 2021-2023, NVIDIA CORPORATION.
"""Define common type operations."""
from __future__ import annotations
from collections import abc
from functools import wraps
from inspect import isclass
from typing import List, Union
import cupy as cp
import numpy as np
import pandas as pd
from pandas.api import ty... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/api/__init__.py | # Copyright (c) 2021, NVIDIA CORPORATION.
from cudf.api import extensions, types
__all__ = ["extensions", "types"]
| 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/api | rapidsai_public_repos/cudf/python/cudf/cudf/api/extensions/accessor.py | # Copyright (c) 2020-2022, NVIDIA CORPORATION.
import warnings
from pandas.core.accessor import CachedAccessor
import cudf
from cudf.utils.docutils import docfmt_partial
_docstring_register_accessor = """
Extends `cudf.{klass}` with custom defined accessor
Parameters
----------
name : str
T... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/api | rapidsai_public_repos/cudf/python/cudf/cudf/api/extensions/__init__.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
from pandas.api.extensions import no_default
from cudf.api.extensions.accessor import (
register_dataframe_accessor,
register_index_accessor,
register_series_accessor,
)
__all__ = [
"no_default",
"register_dataframe_accessor",
"register_index_acc... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_fuzz_testing/orc.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
import copy
import io
import logging
import random
import numpy as np
import pyarrow as pa
import cudf
from cudf._fuzz_testing.io import IOFuzz
from cudf._fuzz_testing.utils import (
ALL_POSSIBLE_VALUES,
_generate_rand_meta,
pyarrow_to_pandas,
)
from cudf.te... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_fuzz_testing/avro.py | # Copyright (c) 2020-2022, NVIDIA CORPORATION.
import copy
import io
import logging
import random
import numpy as np
import cudf
from cudf._fuzz_testing.io import IOFuzz
from cudf._fuzz_testing.utils import (
ALL_POSSIBLE_VALUES,
_generate_rand_meta,
pandas_to_avro,
pyarrow_to_pandas,
)
from cudf.tes... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_fuzz_testing/csv.py | # Copyright (c) 2020-2022, NVIDIA CORPORATION.
import logging
import random
import numpy as np
import cudf
from cudf._fuzz_testing.io import IOFuzz
from cudf._fuzz_testing.utils import (
ALL_POSSIBLE_VALUES,
_generate_rand_meta,
pyarrow_to_pandas,
)
from cudf.testing import dataset_generator as dg
from c... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_fuzz_testing/parquet.py | # Copyright (c) 2020-2022, NVIDIA CORPORATION.
import logging
import random
import numpy as np
import cudf
from cudf._fuzz_testing.io import IOFuzz
from cudf._fuzz_testing.utils import (
ALL_POSSIBLE_VALUES,
_generate_rand_meta,
pyarrow_to_pandas,
)
from cudf.testing import dataset_generator as dg
loggi... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_fuzz_testing/json.py | # Copyright (c) 2020-2022, NVIDIA CORPORATION.
import logging
import random
from collections import abc
import numpy as np
import cudf
from cudf._fuzz_testing.io import IOFuzz
from cudf._fuzz_testing.utils import (
ALL_POSSIBLE_VALUES,
_generate_rand_meta,
pyarrow_to_pandas,
)
from cudf.testing import da... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_fuzz_testing/io.py | # Copyright (c) 2020-2022, NVIDIA CORPORATION.
import copy
import json
import logging
import os
import random
import sys
import numpy as np
logging.basicConfig(
format="%(asctime)s %(levelname)-8s %(message)s",
level=logging.INFO,
datefmt="%Y-%m-%d %H:%M:%S",
)
class IOFuzz:
def __init__(
s... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_fuzz_testing/fuzzer.py | # Copyright (c) 2020-2022, NVIDIA CORPORATION.
import datetime
import json
import logging
import os
import sys
import traceback
logging.basicConfig(
format="%(asctime)s %(levelname)-8s %(message)s",
level=logging.INFO,
datefmt="%Y-%m-%d %H:%M:%S",
)
class Fuzzer:
def __init__(
self,
... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_fuzz_testing/main.py | # Copyright (c) 2020-2022, NVIDIA CORPORATION.
from cudf._fuzz_testing import fuzzer
class PythonFuzz:
def __init__(self, func, params=None, data_handle=None, **kwargs):
self.function = func
self.data_handler_class = data_handle
self.fuzz_worker = fuzzer.Fuzzer(
target=self.fu... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/_fuzz_testing/utils.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
import random
import fastavro
import numpy as np
import pandas as pd
import pyarrow as pa
import cudf
from cudf.testing._utils import assert_eq
from cudf.utils.dtypes import (
pandas_dtypes_to_np_dtypes,
pyarrow_dtypes_to_pandas_dtypes,
)
ALL_POSSIBLE_VALUES = ... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/_fuzz_testing | rapidsai_public_repos/cudf/python/cudf/cudf/_fuzz_testing/tests/fuzz_test_csv.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
import sys
from io import StringIO
import pandas as pd
import cudf
from cudf._fuzz_testing.csv import CSVReader, CSVWriter
from cudf._fuzz_testing.main import pythonfuzz
from cudf._fuzz_testing.utils import (
ALL_POSSIBLE_VALUES,
compare_content,
run_test,
)... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/_fuzz_testing | rapidsai_public_repos/cudf/python/cudf/cudf/_fuzz_testing/tests/fuzz_test_parquet.py | # Copyright (c) 2020-2022, NVIDIA CORPORATION.
import sys
import numpy as np
import pandas as pd
import cudf
from cudf._fuzz_testing.main import pythonfuzz
from cudf._fuzz_testing.parquet import ParquetReader, ParquetWriter
from cudf._fuzz_testing.utils import (
ALL_POSSIBLE_VALUES,
compare_dataframe,
ru... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/_fuzz_testing | rapidsai_public_repos/cudf/python/cudf/cudf/_fuzz_testing/tests/fuzz_test_avro.py | # Copyright (c) 2020, NVIDIA CORPORATION.
import sys
import cudf
from cudf._fuzz_testing.avro import AvroReader
from cudf._fuzz_testing.main import pythonfuzz
from cudf._fuzz_testing.utils import (
ALL_POSSIBLE_VALUES,
compare_dataframe,
run_test,
)
@pythonfuzz(
data_handle=AvroReader,
params={
... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/_fuzz_testing | rapidsai_public_repos/cudf/python/cudf/cudf/_fuzz_testing/tests/fuzz_test_orc.py | # Copyright (c) 2020-2022, NVIDIA CORPORATION.
import io
import sys
import cudf
from cudf._fuzz_testing.main import pythonfuzz
from cudf._fuzz_testing.orc import OrcReader, OrcWriter
from cudf._fuzz_testing.utils import (
ALL_POSSIBLE_VALUES,
compare_dataframe,
orc_to_pandas,
run_test,
)
@pythonfuzz... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/_fuzz_testing | rapidsai_public_repos/cudf/python/cudf/cudf/_fuzz_testing/tests/fuzz_test_json.py | # Copyright (c) 2020, NVIDIA CORPORATION.
import io
import sys
import pandas as pd
import cudf
from cudf._fuzz_testing.json import JSONReader, JSONWriter
from cudf._fuzz_testing.main import pythonfuzz
from cudf._fuzz_testing.utils import ALL_POSSIBLE_VALUES, run_test
from cudf.testing._utils import assert_eq
@pyth... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf/_fuzz_testing | rapidsai_public_repos/cudf/python/cudf/cudf/_fuzz_testing/tests/readme.md | # Fuzz Tests
This directory contains all the Fuzz tests for cudf library.
## Steps to write a fuzz test
1. Add a Data Handler class which actually generates the necessary random data according to your requirements. This class should be added in `cudf/cudf/testing/`. A sample data handler class is: `CSVWriter`: http... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/comm/serialize.py | # Copyright (c) 2019-2022, NVIDIA CORPORATION.
import cudf # noqa: F401
from cudf.core.abc import Serializable
try:
from distributed.protocol import dask_deserialize, dask_serialize
from distributed.protocol.cuda import cuda_deserialize, cuda_serialize
from distributed.utils import log_errors
@cuda_... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/io/dlpack.py | # Copyright (c) 2019-2022, NVIDIA CORPORATION.
import cudf
from cudf._lib import interop as libdlpack
from cudf.core.column import ColumnBase
from cudf.utils import ioutils
def from_dlpack(pycapsule_obj):
"""Converts from a DLPack tensor to a cuDF object.
DLPack is an open-source memory tensor structure:
... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/io/hdf.py | # Copyright (c) 2019, NVIDIA CORPORATION.
import warnings
import pandas as pd
import cudf
from cudf.utils import ioutils
@ioutils.doc_read_hdf()
def read_hdf(path_or_buf, *args, **kwargs):
"""{docstring}"""
warnings.warn(
"Using CPU via Pandas to read HDF dataset, this may "
"be GPU acceler... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/io/orc.py | # Copyright (c) 2019-2023, NVIDIA CORPORATION.
import datetime
import warnings
import pyarrow as pa
from fsspec.utils import stringify_path
import cudf
from cudf._lib import orc as liborc
from cudf.api.types import is_list_like
from cudf.utils import ioutils
from cudf.utils.metadata import ( # type: ignore
orc_... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/io/avro.py | # Copyright (c) 2019-2022, NVIDIA CORPORATION.
import cudf
from cudf import _lib as libcudf
from cudf.utils import ioutils
@ioutils.doc_read_avro()
def read_avro(
filepath_or_buffer,
columns=None,
skiprows=None,
num_rows=None,
storage_options=None,
):
"""{docstring}"""
is_single_filepath... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/io/csv.py | # Copyright (c) 2018-2023, NVIDIA CORPORATION.
from collections import abc
from io import BytesIO, StringIO
import numpy as np
from pyarrow.lib import NativeFile
import cudf
from cudf import _lib as libcudf
from cudf.api.types import is_scalar
from cudf.utils import ioutils
from cudf.utils.dtypes import _maybe_conve... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/io/feather.py | # Copyright (c) 2019, NVIDIA CORPORATION.
import warnings
from pyarrow import feather
from cudf.core.dataframe import DataFrame
from cudf.utils import ioutils
@ioutils.doc_read_feather()
def read_feather(path, *args, **kwargs):
"""{docstring}"""
warnings.warn(
"Using CPU via PyArrow to read feathe... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/io/parquet.py | # Copyright (c) 2019-2023, NVIDIA CORPORATION.
from __future__ import annotations
import itertools
import math
import operator
import shutil
import tempfile
import warnings
from collections import defaultdict
from contextlib import ExitStack
from functools import partial, reduce
from typing import Callable, Dict, List... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/io/json.py | # Copyright (c) 2019-2023, NVIDIA CORPORATION.
import warnings
from collections import abc
from io import BytesIO, StringIO
import numpy as np
import pandas as pd
import cudf
from cudf._lib import json as libjson
from cudf.api.types import is_list_like
from cudf.utils import ioutils
from cudf.utils.dtypes import _ma... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/io/text.py | # Copyright (c) 2018-2023, NVIDIA CORPORATION.
from io import BytesIO, StringIO
import cudf
from cudf._lib import text as libtext
from cudf.utils import ioutils
from cudf.utils.nvtx_annotation import _cudf_nvtx_annotate
@_cudf_nvtx_annotate
@ioutils.doc_read_text()
def read_text(
filepath_or_buffer,
delimit... | 0 |
rapidsai_public_repos/cudf/python/cudf/cudf | rapidsai_public_repos/cudf/python/cudf/cudf/io/__init__.py | # Copyright (c) 2018-2022, NVIDIA CORPORATION.
from cudf.io.avro import read_avro
from cudf.io.csv import read_csv, to_csv
from cudf.io.dlpack import from_dlpack
from cudf.io.feather import read_feather
from cudf.io.hdf import read_hdf
from cudf.io.json import read_json
from cudf.io.orc import read_orc, read_orc_metada... | 0 |
rapidsai_public_repos/cudf/python/cudf | rapidsai_public_repos/cudf/python/cudf/cudf_pandas_tests/test_profiler.py | # SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
# All rights reserved.
# SPDX-License-Identifier: Apache-2.0
from cudf.pandas import LOADED, Profiler
if not LOADED:
raise ImportError("These tests must be run with cudf.pandas loaded")
import numpy as np
import pandas as pd
def test... | 0 |
rapidsai_public_repos/cudf/python/cudf | rapidsai_public_repos/cudf/python/cudf/cudf_pandas_tests/test_magics.py | # SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
# All rights reserved.
# SPDX-License-Identifier: Apache-2.0
import os
import pathlib
import subprocess
import sys
import pytest
# Proxy check for whether the proxy could be referencing GPU objects without
# trying to import cuDF, which c... | 0 |
rapidsai_public_repos/cudf/python/cudf | rapidsai_public_repos/cudf/python/cudf/cudf_pandas_tests/test_cudf_pandas.py | # SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
# All rights reserved.
# SPDX-License-Identifier: Apache-2.0
import collections
import copy
import datetime
import operator
import pathlib
import pickle
import tempfile
import types
from io import BytesIO, StringIO
import numpy as np
import... | 0 |
rapidsai_public_repos/cudf/python/cudf | rapidsai_public_repos/cudf/python/cudf/cudf_pandas_tests/test_fast_slow_proxy.py | # SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
# All rights reserved.
# SPDX-License-Identifier: Apache-2.0
import inspect
from functools import partial
from io import StringIO
import numpy as np
import pytest
from cudf.pandas.fast_slow_proxy import (
_fast_arg,
_FunctionProxy,... | 0 |
rapidsai_public_repos/cudf/python/cudf | rapidsai_public_repos/cudf/python/cudf/cudf_pandas_tests/_magics_gpu_test.py | # SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
# All rights reserved.
# SPDX-License-Identifier: Apache-2.0
def ipython_magics_gpu_test():
from IPython.core.interactiveshell import InteractiveShell
# Use in-memory history file to avoid file handles leaking
# https://github.... | 0 |
rapidsai_public_repos/cudf/python/cudf | rapidsai_public_repos/cudf/python/cudf/cudf_pandas_tests/test_array_function.py | # SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
# All rights reserved.
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import pytest
from cudf.pandas import LOADED
from cudf.pandas._wrappers.common import array_function_method
if not LOADED:
raise ImportError("These tests m... | 0 |
rapidsai_public_repos/cudf/python/cudf | rapidsai_public_repos/cudf/python/cudf/cudf_pandas_tests/_magics_cpu_test.py | # SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
# All rights reserved.
# SPDX-License-Identifier: Apache-2.0
def ipython_magics_cpu_test():
import warnings
from IPython.core.interactiveshell import InteractiveShell
# Use in-memory history file to avoid file handles leaking
... | 0 |
rapidsai_public_repos/cudf/python/cudf | rapidsai_public_repos/cudf/python/cudf/cudf_pandas_tests/test_cudf_pandas_cudf_interop.py | # SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
# All rights reserved.
# SPDX-License-Identifier: Apache-2.0
import cudf
from cudf.pandas import LOADED
if not LOADED:
raise ImportError("These tests must be run with cudf.pandas loaded")
import pandas as pd
def test_cudf_pandas_load... | 0 |
rapidsai_public_repos/cudf/python/cudf | rapidsai_public_repos/cudf/python/cudf/udf_cpp/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 | rapidsai_public_repos/cudf/python/cudf/udf_cpp/shim.cu | /*
* 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | 0 |
rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings | rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings/udf/pad.cuh |
/*
* 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicabl... | 0 |
rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings | rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings/udf/char_types.cuh | /*
* 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | 0 |
rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings | rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings/udf/udf_apis.hpp | /*
* 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | 0 |
rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings | rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings/udf/udf_string.cuh | /*
* Copyright (c) 2020-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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | 0 |
rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings | rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings/udf/replace.cuh | /*
* 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | 0 |
rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings | rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings/udf/numeric.cuh |
/*
* 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicabl... | 0 |
rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings | rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings/udf/strip.cuh |
/*
* 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicabl... | 0 |
rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings | rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings/udf/udf_string.hpp | /*
* Copyright (c) 2020-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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | 0 |
rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings | rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings/udf/search.cuh | /*
* 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | 0 |
rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings | rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings/udf/case.cuh | /*
* 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | 0 |
rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings | rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings/udf/split.cuh | /*
* 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | 0 |
rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings | rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/include/cudf/strings/udf/starts_with.cuh | /*
* 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | 0 |
rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/src/strings | rapidsai_public_repos/cudf/python/cudf/udf_cpp/strings/src/strings/udf/udf_apis.cu | /*
* 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | 0 |
rapidsai_public_repos/cudf/python/cudf | rapidsai_public_repos/cudf/python/cudf/benchmarks/conftest.py | # Copyright (c) 2022, NVIDIA CORPORATION.
"""Defines pytest fixtures for all benchmarks.
Most fixtures defined in this file represent one of the primary classes in the
cuDF ecosystem such as DataFrame, Series, or Index. These fixtures may in turn
be broken up into two categories: base fixtures and fixture unions. Eac... | 0 |
rapidsai_public_repos/cudf/python/cudf | rapidsai_public_repos/cudf/python/cudf/benchmarks/pytest.ini | # Copyright (c) 2022, NVIDIA CORPORATION.
[pytest]
python_files = bench_*.py
python_classes = Bench
python_functions = bench_*
markers =
pandas_incompatible: mark a benchmark that cannot be run with pandas
| 0 |
rapidsai_public_repos/cudf/python/cudf/benchmarks | rapidsai_public_repos/cudf/python/cudf/benchmarks/API/bench_indexed_frame.py | # Copyright (c) 2022, NVIDIA CORPORATION.
"""Benchmarks of IndexedFrame methods."""
import pytest
from utils import benchmark_with_object
@benchmark_with_object(cls="indexedframe", dtype="int")
@pytest.mark.parametrize("op", ["cumsum", "cumprod", "cummax"])
def bench_scans(benchmark, op, indexedframe):
benchmar... | 0 |
rapidsai_public_repos/cudf/python/cudf/benchmarks | rapidsai_public_repos/cudf/python/cudf/benchmarks/API/bench_dataframe_cases.py | # Copyright (c) 2022, NVIDIA CORPORATION.
from utils import benchmark_with_object
@benchmark_with_object(cls="dataframe", dtype="int", nulls=False)
def where_case_1(dataframe):
return dataframe, dataframe % 2 == 0, 0
@benchmark_with_object(cls="dataframe", dtype="int", nulls=False)
def where_case_2(dataframe):... | 0 |
rapidsai_public_repos/cudf/python/cudf/benchmarks | rapidsai_public_repos/cudf/python/cudf/benchmarks/API/bench_multiindex.py | # Copyright (c) 2022, NVIDIA CORPORATION.
"""Benchmarks of MultiIndex methods."""
import numpy as np
import pandas as pd
import pytest
from config import cudf
@pytest.fixture
def pidx():
num_elements = int(1e3)
a = np.random.randint(0, num_elements // 10, num_elements)
b = np.random.randint(0, num_eleme... | 0 |
rapidsai_public_repos/cudf/python/cudf/benchmarks | rapidsai_public_repos/cudf/python/cudf/benchmarks/API/bench_series.py | # Copyright (c) 2022, NVIDIA CORPORATION.
"""Benchmarks of Series methods."""
import pytest
from config import cudf, cupy
from utils import benchmark_with_object
@pytest.mark.parametrize("N", [100, 1_000_000])
def bench_construction(benchmark, N):
benchmark(cudf.Series, cupy.random.rand(N))
@benchmark_with_ob... | 0 |
rapidsai_public_repos/cudf/python/cudf/benchmarks | rapidsai_public_repos/cudf/python/cudf/benchmarks/API/bench_frame_or_index.py | # Copyright (c) 2022, NVIDIA CORPORATION.
"""Benchmarks of methods that exist for both Frame and BaseIndex."""
import operator
import numpy as np
import pytest
from utils import benchmark_with_object, make_gather_map
@benchmark_with_object(cls="frame_or_index", dtype="int")
@pytest.mark.parametrize("gather_how", [... | 0 |
rapidsai_public_repos/cudf/python/cudf/benchmarks | rapidsai_public_repos/cudf/python/cudf/benchmarks/API/bench_rangeindex.py | # Copyright (c) 2022, NVIDIA CORPORATION.
import pytest
@pytest.mark.pandas_incompatible
def bench_values_host(benchmark, rangeindex):
benchmark(lambda: rangeindex.values_host)
def bench_to_numpy(benchmark, rangeindex):
benchmark(rangeindex.to_numpy)
@pytest.mark.pandas_incompatible
def bench_to_arrow(be... | 0 |
rapidsai_public_repos/cudf/python/cudf/benchmarks | rapidsai_public_repos/cudf/python/cudf/benchmarks/API/bench_functions_cases.py | # Copyright (c) 2022, NVIDIA CORPORATION.
"""Test cases for benchmarks in bench_functions.py."""
import pytest_cases
from config import NUM_ROWS, cudf, cupy
@pytest_cases.parametrize("nr", NUM_ROWS)
def concat_case_default_index(nr):
return [
cudf.DataFrame({"a": cupy.tile([1, 2, 3], nr)}),
cudf... | 0 |
rapidsai_public_repos/cudf/python/cudf/benchmarks | rapidsai_public_repos/cudf/python/cudf/benchmarks/API/bench_index.py | # Copyright (c) 2022, NVIDIA CORPORATION.
"""Benchmarks of Index methods."""
import pytest
from config import cudf, cupy
from utils import benchmark_with_object
@pytest.mark.parametrize("N", [100, 1_000_000])
def bench_construction(benchmark, N):
benchmark(cudf.Index, cupy.random.rand(N))
@benchmark_with_obje... | 0 |
rapidsai_public_repos/cudf/python/cudf/benchmarks | rapidsai_public_repos/cudf/python/cudf/benchmarks/API/bench_dataframe.py | # Copyright (c) 2022-2023, NVIDIA CORPORATION.
"""Benchmarks of DataFrame methods."""
import string
import numpy
import pytest
import pytest_cases
from config import cudf, cupy
from utils import benchmark_with_object
@pytest.mark.parametrize("N", [100, 1_000_000])
def bench_construction(benchmark, N):
benchmar... | 0 |
rapidsai_public_repos/cudf/python/cudf/benchmarks | rapidsai_public_repos/cudf/python/cudf/benchmarks/API/bench_functions.py | # Copyright (c) 2022, NVIDIA CORPORATION.
"""Benchmarks of free functions that accept cudf objects."""
import numpy as np
import pytest
import pytest_cases
from config import NUM_ROWS, cudf, cupy
from utils import benchmark_with_object
@pytest_cases.parametrize_with_cases("objs", prefix="concat")
@pytest.mark.param... | 0 |
rapidsai_public_repos/cudf/python/cudf/benchmarks | rapidsai_public_repos/cudf/python/cudf/benchmarks/internal/bench_column.py | # Copyright (c) 2022, NVIDIA CORPORATION.
"""Benchmarks of Column methods."""
import pytest
import pytest_cases
from utils import (
benchmark_with_object,
make_boolean_mask_column,
make_gather_map,
)
@benchmark_with_object(cls="column", dtype="float")
def bench_apply_boolean_mask(benchmark, column):
... | 0 |
rapidsai_public_repos/cudf/python/cudf/benchmarks | rapidsai_public_repos/cudf/python/cudf/benchmarks/internal/conftest.py | # Copyright (c) 2022, NVIDIA CORPORATION.
"""Defines pytest fixtures for internal benchmarks."""
from config import NUM_ROWS, cudf
from utils import (
OrderedSet,
collapse_fixtures,
column_generators,
make_fixture,
)
fixtures = OrderedSet()
for dtype, column_generator in column_generators.items():
... | 0 |
rapidsai_public_repos/cudf/python/cudf/benchmarks | rapidsai_public_repos/cudf/python/cudf/benchmarks/internal/bench_rangeindex_internal.py | # Copyright (c) 2022, NVIDIA CORPORATION.
"""Benchmarks of internal RangeIndex methods."""
def bench_column(benchmark, rangeindex):
benchmark(lambda: rangeindex._column)
def bench_columns(benchmark, rangeindex):
benchmark(lambda: rangeindex._columns)
| 0 |
rapidsai_public_repos/cudf/python/cudf/benchmarks | rapidsai_public_repos/cudf/python/cudf/benchmarks/internal/bench_dataframe_internal.py | # Copyright (c) 2022-2023, NVIDIA CORPORATION.
"""Benchmarks of internal DataFrame methods."""
from utils import benchmark_with_object, make_boolean_mask_column
from cudf.core.copy_types import BooleanMask
@benchmark_with_object(cls="dataframe", dtype="int")
def bench_apply_boolean_mask(benchmark, dataframe):
... | 0 |
rapidsai_public_repos/cudf/python/cudf/benchmarks | rapidsai_public_repos/cudf/python/cudf/benchmarks/common/config.py | # Copyright (c) 2022, NVIDIA CORPORATION.
"""Module used for global configuration of benchmarks.
This file contains global definitions that are important for configuring all
benchmarks such as fixture sizes. In addition, this file supports the following
features:
- Defining the CUDF_BENCHMARKS_USE_PANDAS environm... | 0 |
rapidsai_public_repos/cudf/python/cudf/benchmarks | rapidsai_public_repos/cudf/python/cudf/benchmarks/common/utils.py | # Copyright (c) 2022, NVIDIA CORPORATION.
"""Common utilities for fixture creation and benchmarking."""
import inspect
import re
import textwrap
from collections.abc import MutableSet
from itertools import groupby
from numbers import Real
import pytest_cases
from config import NUM_COLS, NUM_ROWS, cudf, cupy
def ma... | 0 |
rapidsai_public_repos/cudf/python/cudf/cmake | rapidsai_public_repos/cudf/python/cudf/cmake/Modules/ProtobufHelpers.cmake | # =============================================================================
# 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/cmake | rapidsai_public_repos/cudf/python/cudf/cmake/Modules/WheelHelpers.cmake | # =============================================================================
# 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 | rapidsai_public_repos/cudf/python/custreamz/pyproject.toml | # Copyright (c) 2021-2022, NVIDIA CORPORATION.
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools",
"wheel",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.
[project]
name ... | 0 |
rapidsai_public_repos/cudf/python | rapidsai_public_repos/cudf/python/custreamz/README.md | # custreamz - GPU Accelerated Streaming
Built as an extension to [python streamz](https://github.com/python-streamz/streamz), cuStreamz provides GPU accelerated abstractions for streaming data. CuStreamz can be used along side python streamz or as a standalone library for ingesting streaming data to cudf dataframes.
... | 0 |
rapidsai_public_repos/cudf/python | rapidsai_public_repos/cudf/python/custreamz/setup.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
from setuptools import setup
setup(
package_data={"custreamz": ["VERSION"]},
)
| 0 |
rapidsai_public_repos/cudf/python | rapidsai_public_repos/cudf/python/custreamz/LICENSE | Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
... | 0 |
rapidsai_public_repos/cudf/python | rapidsai_public_repos/cudf/python/custreamz/.coveragerc | # Configuration file for Python coverage tests
[run]
source = custreamz
| 0 |
rapidsai_public_repos/cudf/python/custreamz | rapidsai_public_repos/cudf/python/custreamz/custreamz/kafka.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
import confluent_kafka as ck
from cudf_kafka._lib.kafka import KafkaDatasource
import cudf
# Base class for anything class that needs to interact with Apache Kafka
class CudfKafkaClient:
def __init__(self, kafka_configs):
"""
Base object for any clie... | 0 |
rapidsai_public_repos/cudf/python/custreamz | rapidsai_public_repos/cudf/python/custreamz/custreamz/_version.py | # Copyright (c) 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.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 0 |
rapidsai_public_repos/cudf/python/custreamz | rapidsai_public_repos/cudf/python/custreamz/custreamz/__init__.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
from ._version import __git_commit__, __version__
from .kafka import Consumer
| 0 |
rapidsai_public_repos/cudf/python/custreamz | rapidsai_public_repos/cudf/python/custreamz/custreamz/VERSION | 24.02.00
| 0 |
rapidsai_public_repos/cudf/python/custreamz/custreamz | rapidsai_public_repos/cudf/python/custreamz/custreamz/tests/test_kafka.py | # Copyright (c) 2020, NVIDIA CORPORATION.
import confluent_kafka as ck
import pytest
from cudf.testing._utils import assert_eq
@pytest.mark.parametrize("commit_offset", [1, 45, 100, 22, 1000, 10])
@pytest.mark.parametrize("topic", ["cudf-kafka-test-topic"])
def test_kafka_offset(kafka_client, topic, commit_offset):
... | 0 |
rapidsai_public_repos/cudf/python/custreamz/custreamz | rapidsai_public_repos/cudf/python/custreamz/custreamz/tests/test_dataframes.py | # Copyright (c) 2020-2023, NVIDIA CORPORATION.
"""
Tests for Streamz Dataframes (SDFs) built on top of cuDF DataFrames.
*** Borrowed from streamz.dataframe.tests | License at thirdparty/LICENSE ***
"""
import json
import operator
import numpy as np
import pandas as pd
import pytest
from dask.dataframe.utils import ... | 0 |
rapidsai_public_repos/cudf/python/custreamz/custreamz | rapidsai_public_repos/cudf/python/custreamz/custreamz/tests/conftest.py | # Copyright (c) 2020-2022, NVIDIA CORPORATION.
import socket
import pytest
from custreamz import kafka
@pytest.fixture(scope="session")
def kafka_client():
# Check for the existence of a kafka broker
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
s.connect_ex(("localhost", 9092))
... | 0 |
rapidsai_public_repos/cudf | rapidsai_public_repos/cudf/java/README.md | # Java API for cudf
This project provides java bindings for cudf, to be able to process large amounts of data on
a GPU. This is still a work in progress so some APIs may change until the 1.0 release.
## Behavior on Systems with Multiple GPUs
The cudf project currently works with a single GPU per process. The CUDA ru... | 0 |
rapidsai_public_repos/cudf | rapidsai_public_repos/cudf/java/pom.xml | <?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2019-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.apache.org/licenses/LICENSE-2.0
... | 0 |
rapidsai_public_repos/cudf/java | rapidsai_public_repos/cudf/java/dev/cudf_java_styles.xml | <code_scheme name="cudf_java" version="173">
<JavaCodeStyleSettings>
<option name="JD_ADD_BLANK_AFTER_DESCRIPTION" value="false" />
</JavaCodeStyleSettings>
<codeStyleSettings language="JAVA">
<option name="RIGHT_MARGIN" value="100" />
<option name="KEEP_SIMPLE_BLOCKS_IN_ONE_LINE" value="true" />
... | 0 |
rapidsai_public_repos/cudf/java | rapidsai_public_repos/cudf/java/ci/README.md | # Build Jar artifact of cuDF
## Build the docker image
### Prerequisite
1. Docker should be installed.
2. [nvidia-docker](https://github.com/NVIDIA/nvidia-docker) should be installed.
### Build the docker image
In the root path of cuDF repo, run below command to build the docker image.
```bash
docker build -f java... | 0 |
rapidsai_public_repos/cudf/java | rapidsai_public_repos/cudf/java/ci/build-in-docker.sh | #!/bin/bash
#
# Copyright (c) 2020-2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unles... | 0 |
rapidsai_public_repos/cudf/java | rapidsai_public_repos/cudf/java/ci/Dockerfile.centos7 | #
# Copyright (c) 2020-2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 0 |
rapidsai_public_repos/cudf/java/src/main/java/ai/rapids | rapidsai_public_repos/cudf/java/src/main/java/ai/rapids/cudf/JCudfSerialization.java | /*
*
* Copyright (c) 2019-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.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | 0 |
rapidsai_public_repos/cudf/java/src/main/java/ai/rapids | rapidsai_public_repos/cudf/java/src/main/java/ai/rapids/cudf/CuFileBuffer.java | /*
* Copyright (c) 2021, 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... | 0 |
rapidsai_public_repos/cudf/java/src/main/java/ai/rapids | rapidsai_public_repos/cudf/java/src/main/java/ai/rapids/cudf/RmmCudaAsyncMemoryResource.java | /*
* Copyright (c) 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... | 0 |
rapidsai_public_repos/cudf/java/src/main/java/ai/rapids | rapidsai_public_repos/cudf/java/src/main/java/ai/rapids/cudf/MixedJoinSize.java | /*
* Copyright (c) 2022, 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... | 0 |
rapidsai_public_repos/cudf/java/src/main/java/ai/rapids | rapidsai_public_repos/cudf/java/src/main/java/ai/rapids/cudf/NullEquality.java | /*
*
* Copyright (c) 2021, 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applic... | 0 |
rapidsai_public_repos/cudf/java/src/main/java/ai/rapids | rapidsai_public_repos/cudf/java/src/main/java/ai/rapids/cudf/HashType.java | /*
*
* Copyright (c) 2020-2021, 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | 0 |
rapidsai_public_repos/cudf/java/src/main/java/ai/rapids | rapidsai_public_repos/cudf/java/src/main/java/ai/rapids/cudf/CloseableArray.java | /*
* Copyright (c) 2021, 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... | 0 |
rapidsai_public_repos/cudf/java/src/main/java/ai/rapids | rapidsai_public_repos/cudf/java/src/main/java/ai/rapids/cudf/CudfException.java | /*
* Copyright (c) 2019-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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | 0 |
rapidsai_public_repos/cudf/java/src/main/java/ai/rapids | rapidsai_public_repos/cudf/java/src/main/java/ai/rapids/cudf/RegexProgram.java | /*
*
* Copyright (c) 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applic... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.