Skip to content

Commit fe4792d

Browse files
author
Kevin
committed
first commit
0 parents  commit fe4792d

9 files changed

Lines changed: 672 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: [3.8, 3.9, "3.10"]
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install -r requirements.txt
26+
pip install pytest pytest-cov black pylint
27+
- name: Run tests
28+
run: |
29+
pytest tests/ --cov=src/ --cov-report=xml
30+
- name: Check code formatting
31+
run: |
32+
black --check src/ tests/
33+
- name: Lint code
34+
run: |
35+
pylint src/ tests/

.gitignore

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
build/
8+
develop-eggs/
9+
dist/
10+
downloads/
11+
eggs/
12+
.eggs/
13+
lib/
14+
lib64/
15+
parts/
16+
sdist/
17+
var/
18+
wheels/
19+
*.egg-info/
20+
.installed.cfg
21+
*.egg
22+
23+
# Jupyter Notebook
24+
.ipynb_checkpoints
25+
*/.ipynb_checkpoints/*
26+
27+
# VS Code
28+
.vscode/*
29+
!.vscode/settings.json
30+
!.vscode/tasks.json
31+
!.vscode/launch.json
32+
!.vscode/extensions.json
33+
34+
# Environment
35+
.env
36+
.venv
37+
env/
38+
venv/
39+
ENV/
40+
41+
# Data
42+
data/
43+
*.csv
44+
*.parquet
45+
*.h5
46+
*.pkl
47+
48+
# Logs
49+
*.log
50+
logs/
51+
52+
# Cache
53+
.cache/
54+
.pytest_cache/
55+
.coverage
56+
htmlcov/
57+
58+
# OS
59+
.DS_Store
60+
Thumbs.db

.vscode/settings.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"python.linting.enabled": true,
3+
"python.linting.pylintEnabled": true,
4+
"python.formatting.provider": "black",
5+
"editor.formatOnSave": true,
6+
"python.testing.pytestEnabled": true,
7+
"python.testing.unittestEnabled": false,
8+
"python.testing.nosetestsEnabled": false,
9+
"python.testing.pytestArgs": [
10+
"tests"
11+
],
12+
"jupyter.notebookFileRoot": "${workspaceFolder}",
13+
"python.analysis.typeCheckingMode": "basic"
14+
}

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# GPU-Accelerated Data Science with Python
2+
3+
This repository contains examples of how to accelerate common Python data science libraries using NVIDIA GPUs. Each notebook demonstrates a different library and shows how to enable GPU acceleration with minimal code changes.
4+
5+
## Prerequisites
6+
7+
- NVIDIA GPU with CUDA support
8+
- Python 3.8+
9+
- CUDA Toolkit 11.x or later
10+
- Required Python packages (see `requirements.txt`)
11+
12+
## Installation
13+
14+
1. Create a virtual environment:
15+
```bash
16+
python -m venv venv
17+
source venv/bin/activate # On Windows: venv\Scripts\activate
18+
```
19+
20+
2. Install dependencies:
21+
```bash
22+
pip install -r requirements.txt --extra-index-url https://pypi.nvidia.com
23+
```
24+
25+
## Examples
26+
27+
1. [pandas_acceleration.ipynb](notebooks/pandas_acceleration.ipynb) - Accelerate pandas with cuDF
28+
2. [polars_acceleration.ipynb](notebooks/polars_acceleration.ipynb) - GPU acceleration in Polars
29+
3. [sklearn_acceleration.ipynb](notebooks/sklearn_acceleration.ipynb) - scikit-learn acceleration with cuML
30+
4. [xgboost_acceleration.ipynb](notebooks/xgboost_acceleration.ipynb) - XGBoost on GPU
31+
5. [umap_acceleration.ipynb](notebooks/umap_acceleration.ipynb) - Fast UMAP with cuML
32+
6. [hdbscan_acceleration.ipynb](notebooks/hdbscan_acceleration.ipynb) - HDBSCAN clustering on GPU
33+
7. [networkx_acceleration.ipynb](notebooks/networkx_acceleration.ipynb) - NetworkX with cuGraph
34+
35+
Each notebook contains:
36+
- Setup instructions
37+
- Example code
38+
- Performance comparisons
39+
- Sample datasets
40+
41+
## Usage
42+
43+
Launch Jupyter Lab to explore the notebooks:
44+
```bash
45+
jupyter lab
46+
```

0 commit comments

Comments
 (0)