semvec/pypi-packages huggingface dataset:
pybfs 0.1.1
Python Baseflow Separation - A physically-based baseflow separation algorithm for hydrological analysis
License: MIT
Requires Python: >=3.7
Keywords: hydrology, baseflow, baseflow separation, streamflow, groundwater

# PyBFS

PyBFS - Python Baseflow Separation

A Python implementation of physically-based Baseflow Separation algorithms for hydrological analysis. PyBFS uses a coupled surface-subsurface reservoir model to separate total streamflow into surface flow, baseflow, and direct runoff components.

## Features

- Physically-based baseflow separation using coupled reservoir models
- Forecast baseflow using initial conditions
- Comprehensive visualization tools
- Well-documented API with NumPy-style docstrings

## Installation

### From PyPI (recommended)

```bash
pip install pybfs
```

### From source

```bash
git clone https://github.com/BYU-Hydroinformatics/pybfs.git
cd pybfs
pip install .
```

### Development installation

```bash
git clone https://github.com/BYU-Hydroinformatics/pybfs.git
cd pybfs
pip install -e .
```

## Quick Start

```python
import pandas as pd
from pybfs import get_values_for_site, base_table, PyBFS, plot_baseflow_simulation

# Load streamflow data
streamflow_data = pd.read_csv('streamflow.csv')

# Load site parameters
params_df = pd.read_csv('site_parameters.csv')

# Get parameters for specific site
site_number = 2312200
basin_char, gw_hyd, flow = get_values_for_site(params_df, site_number)

# Extract parameters
area, lb, x1, wb, por = basin_char[0], basin_char[1], basin_char[2], basin_char[3], basin_char[4]
alpha, beta, ks, kb, kz = gw_hyd[0], gw_hyd[1], gw_hyd[2], gw_hyd[3], gw_hyd[4]

# Generate baseflow table
SBT = base_table(lb, x1, wb, beta, kb, streamflow_data, por)

# Run PyBFS baseflow separation
result = PyBFS(streamflow_data, SBT, basin_char, gw_hyd, flow)

# Visualize results
plot_baseflow_simulation(streamflow_data, result)
```

## Requirements

- Python 3.7 or higher
- numpy >= 1.19.0
- pandas >= 1.1.0
- matplotlib >= 3.3.0

## Documentation

Full documentation is available at: [Documentation](https://github.com/BYU-Hydroinformatics/pybfs)

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Contributing

Contributions are welcome! Please see [CONTRIBUTING.md](docs/contributing.md) for guidelines.

## Citation

If you use PyBFS in your research, please cite:

```
PyBFS - Python Baseflow Separation
BYU Hydroinformatics
https://github.com/BYU-Hydroinformatics/pybfs
```

## Support

For issues, questions, or contributions, please visit: https://github.com/BYU-Hydroinformatics/pybfs/issues
tm1637-rpi5-gpiod 2.0.0
TM1637 4-digit display driver for Raspberry Pi 5 using gpiod
License: MIT
Requires Python: >=3.7

# TM1637 Display Library for Raspberry Pi 5 (gpiod-based)

This is a **modified version** of the [`raspberrypi-tm1637`](https://github.com/depklyon/raspberrypi-tm1637) library, adapted to work on **Raspberry Pi 5** using the **`gpiod`** backend.

## 🚀 Why this version?

The Raspberry Pi 5 uses a new GPIO controller that is **not compatible with `RPi.GPIO`**, which the original TM1637 library depends on.

This version replaces `RPi.GPIO` with **`gpiod` (libgpiod)**, the officially supported GPIO access method in Raspberry Pi OS (Bookworm and newer).

Now, version 2.0.0 of `tm1637-rpi5-gpiod`, auto-detects whether libgpiod v1 or v2 is present and uses the appropriate backend:
- libgpiod v1 (legacy API): per-line requests
- libgpiod v2 (new API): `LineSettings` + `request_lines()` + `LineRequest.set_value()`

## 📥 Installation

1. **Install required dependencies**:

   ```bash
   sudo apt update
   sudo apt install python3-libgpiod gpiod
   ```

2. **Install the library via pip**:

   ```bash
   pip install tm1637-rpi5-gpiod
   ```

   Or clone manually:

   ```bash
   git clone https://github.com/villeparamio/tm1637-rpi5-gpiod.git
   cd tm1637-rpi5-gpiod
   pip install .
   ```

## 🧪 Example usage

```python
import tm1637
from time import sleep

CLK = 24  # GPIO24 (physical pin 18)
DIO = 23  # GPIO23 (physical pin 16)

display = tm1637.TM1637(clk=CLK, dio=DIO)
display.brightness(7)

while True:
    display.show("TEST")
    sleep(2)
    display.numbers(12, 34)
    sleep(2)
```

> Make sure your user is in the `gpio` group to access `/dev/gpiochip*` without root.  
> If needed: `sudo usermod -aG gpio $USER && sudo reboot`

## 🛠 Features

- ✅ Raspberry Pi 5 compatible
- ✅ Uses `gpiod`, not `RPi.GPIO`
- ✅ Works with standard 4-digit TM1637 LED displays
- ✅ Supports numbers, text, brightness and temperature

## 🔄 Original sources

- [mcauser/micropython-tm1637](https://github.com/mcauser/micropython-tm1637)
- [depklyon/raspberrypi-tm1637](https://github.com/depklyon/raspberrypi-tm1637)

## 📜 License

This project is licensed under the **MIT License**.

## 💖 Donations

If you find this project useful and want to support its development and maintenance, please consider making a donation.  
Your contribution helps us continue improving and maintaining this free software.

### 💸 PayPal
You can easily donate via PayPal by clicking the button below:

[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/donate/?business=95M7L3UZENS6Q&no_recurring=0&currency_code=EUR)

Thank you for your support. 🙏