semvec/pypi-packages huggingface dataset:
cuda-kernels 0.1.1
CUDA accelerated correlation and sum reduction functions
Requires Python: >=3.6

# CUDA Kernels

A Python package providing CUDA-accelerated functions for autocorrelation and sum reduction operations, with automatic CPU fallback when CUDA is not available.

## Installation

### From PyPI (Recommended)
```bash
pip install cuda-kernels
```

### From GitHub
```bash
pip install git+https://github.com/AstuteFern/cuda-toolkit.git
```

### From Source
```bash
git clone https://github.com/AstuteFern/cuda-toolkit.git
cd cuda-toolkit
pip install .
```

## Requirements

- **Python 3.6+**
- **NumPy**

### Optional (for CUDA acceleration)
- NVIDIA GPU with CUDA support
- CUDA Toolkit (version 11.0+)

**Note:** The package works on any system. If CUDA is not available, it automatically uses optimized CPU implementations.

## Quick Start

```python
import numpy as np
from cuda_kernels import autocorrelation, reduction_sum

# Create test data
data = np.random.randn(1000).astype(np.float32)

# Compute autocorrelation (automatically uses CUDA if available)
acf = autocorrelation(data, max_lag=50)
print(f"Autocorrelation shape: {acf.shape}")

# Compute sum reduction
total = reduction_sum(data)
print(f"Sum: {total}")
```

## API Reference

### `autocorrelation(data, max_lag=None, force_cpu=False)`

Compute autocorrelation of a time series.

**Parameters:**
- `data` (numpy.ndarray): Input 1D array (converted to float32)
- `max_lag` (int, optional): Maximum lag to compute. Default: len(data)-1
- `force_cpu` (bool): Force CPU implementation. Default: False

**Returns:**
- `numpy.ndarray`: Autocorrelation values for lags [0, max_lag)

### `reduction_sum(data, force_cpu=False)`

Compute sum of array elements.

**Parameters:**
- `data` (numpy.ndarray): Input 1D array (converted to float32)
- `force_cpu` (bool): Force CPU implementation. Default: False

**Returns:**
- `float`: Sum of all elements

## Examples

### Basic Usage
```python
import numpy as np
from cuda_kernels import autocorrelation, reduction_sum

# Example 1: Autocorrelation
signal = np.sin(np.linspace(0, 4*np.pi, 1000)).astype(np.float32)
acf = autocorrelation(signal, max_lag=100)

# Example 2: Sum reduction
data = np.array([1, 2, 3, 4, 5], dtype=np.float32)
total = reduction_sum(data)  # Returns 15.0
```

### Checking CUDA Status
```python
import sys
autocorr_module = sys.modules['cuda_kernels.autocorrelation']
reduction_module = sys.modules['cuda_kernels.reduction']

print(f"CUDA available: {autocorr_module._cuda_available}")
```

### Force CPU Mode
```python
# Useful for testing or when you want consistent behavior
cpu_result = reduction_sum(data, force_cpu=True)
```

## Performance

- **With CUDA**: Significant speedup for large arrays (10K+ elements)
- **CPU Fallback**: Optimized NumPy implementations, still efficient for most use cases
- **Automatic Detection**: No configuration needed, works out of the box

## License

MIT License - see LICENSE file for details.
lisnTorch 1.5.0
用于机器学习的辅助工具包
Requires Python: >=3.6

### 目录结构
wheel_demo/
│
├── README.md
├── wheel_demo/
│   ├── __init__.py
│   ├── module1.py
│   ├── module2.py
│   └── ...
│
├── tests/
│   ├── __init__.py
│   ├── test_module1.py
│   ├── test_module2.py
│   └── ...
│
├── setup.py
└── LICENSE

### 说明
依照 https://docs.pingcode.com/ask/1143811.html
如果不想安装, 可以直接复制到 S:\Python\Anaconda3\envs\env39\Lib 中使用

## Installation


```bash


# 普通安装
在模块的根目录下（即 setup.py 所在的目录），打开终端
  pip install .  
这会将 my_module 安装到 Python 环境中，使其可以在任何地方导入

# 开发中安装
[参考文章](https://blog.csdn.net/lydstory123/article/details/143353424)

如果你在开发中不断修改模块，想要在更改后自动生效，可以使用 pip 的开发模式进行安装
  pip install -e .
此时安装的是模块的符号链接版本，修改源代码后无需重新安装。
santanello-soil-heat-flux 1.0.1
Soil Heat Flux Remote Sensing Method from Santanello & Friedl 2003 Python Package
Requires Python: >=3.10

# Santanello Soil Heat Flux Python Package

This package provides a Python implementation of the soil heat flux (G) calculation based on the method proposed by Santanello and Friedl (2003). The algorithm estimates soil heat flux as a function of time of day, net radiation, and soil moisture, capturing the diurnal cycle and moisture dependence of land surface energy balance.


Gregory H. Halverson (they/them)<br>
[gregory.h.halverson@jpl.nasa.gov](mailto:gregory.h.halverson@jpl.nasa.gov)<br>
NASA Jet Propulsion Laboratory 329G


## Features

- Implements the Santanello & Friedl (2003) soil heat flux (G) calculation using published relationships.
- Accepts both numpy arrays and Raster objects for input data.
- Models diurnal variation and soil moisture dependence of soil heat flux.


## Installation

Install the `santanello-soil-heat-flux` package from PyPi using pip:

```fish
pip install santanello-soil-heat-flux
```


## Usage

Import the main function and use it with your raster or numpy array data:

```python
from santanello_soil_heat_flux import santanello_soil_heat_flux

G = santanello_soil_heat_flux(seconds_of_day, Rn, SM)
```

Where:
- `seconds_of_day`: Time in seconds since midnight
- `Rn`: Net radiation in W/m²
- `SM`: Soil moisture in m³/m³


## References

Santanello, J. A., & Friedl, M. A. (2003). Diurnal covariation in soil heat flux and net radiation. *Journal of Applied Meteorology*, 42(6), 851-862.