semvec/pypi-packages huggingface dataset:
sphinx-theme-builder 0.3.2
A tool for authoring Sphinx themes with a simple (opinionated) workflow.
Requires Python: >=3.10

# Sphinx Theme Builder

<!-- start-elevator-pitch -->

Streamline the Sphinx theme development workflow, by building upon existing
standardised tools.

- simplified packaging experience
- simplified JavaScript tooling setup
- development server, with rebuild-on-save and automagical browser reloading
- consistent repository structure across themes

<!-- end-elevator-pitch -->

## Installation

<!-- start-installation -->

This project is available on
[PyPI](https://pypi.org/project/sphinx-theme-builder/), and can be installed
using `pip`:

```
pip install "sphinx-theme-builder[cli]"
```

This project requires modern versions of CPython (>= 3.10).

<!-- end-installation -->

## Usage

Find more details on how to use this project in the [documentation].

## Contributing

`stb` is a volunteer maintained open source project, and we welcome
contributions of all forms. Please take a look at the [Development
Documentation] for more information.

[documentation]: https://sphinx-theme-builder.rtfd.io/
[development documentation]:
  https://sphinx-theme-builder.rtfd.io/en/latest/development/
omega-controller 0.0.5
Lightweight Python driver for Omega CN-series temperature controllers using Modbus over serial
Requires Python: >=3.8

## Omega Controller (Python)

Lightweight Python driver for Omega CN-series temperature controllers using Modbus over serial (via `minimalmodbus`).

### Features
- **PV/SV**: get present value and set temperature setpoint
- **On/Off**: get and set the controller on/off
- **Modes**: PID, ON/OFF, MANUAL, and **PID Program (Ramp/Soak)**
- **PID tuning**: get/set P, I, D
- **Program params**: read/write 64-register blocks for Ramp/Soak (A/B)
- **Error handling**: maps Omega error/status codes and raises helpful exceptions

Install dependencies:
```bash
pip install minimalmodbus
```

Install this driver from via pypi:
```bash
pip install omega-controller
```

### Quickstart
```python
from omega_controller import OmegaController, OmegaControllerError

# Adjust port/slave as needed for your setup
ctrl = OmegaController(port="COM3", slave_address=1, baudrate=9600, parity="even", bytesize=7, stopbits=1, mode="ascii")

try:
    # Optional: raise if the controller is reporting an error
    ctrl.check_errors()

    # Read process value (°C)
    pv = ctrl.get_pv()
    print("PV:", pv)

    # Set temperature setpoint (°C)
    ctrl.set_sv(150.0)

    # Switch to PID Program (Ramp/Soak) mode
    ctrl.set_control_method("program")

    # Tune PID
    ctrl.set_p(12.3)
    ctrl.set_i(600)
    ctrl.set_d(120)

except OmegaControllerError as e:
    print("Controller error:", e)
finally:
    ctrl.close()
```

### API Overview
- **PV/SV**
  - `get_pv(raise_on_error=False) -> Optional[float]`
  - `get_sv() -> Optional[float]`
  - `set_sv(temp_c: float) -> None`
- **Control method**
  - `get_control_method() -> Optional[int]`  (0=PID, 1=ON/OFF, 2=MANUAL, 3=PROGRAM)
  - `set_control_method(method: int|str) -> None`
- **PID**
  - `get_p()/set_p()` – proportional band (0.1 resolution)
  - `get_i()/set_i()` – integral time (seconds)
  - `get_d()/set_d()` – derivative time (seconds)
- **Ramp/Soak program parameters**
  - Blocks: **A** = `0x2000–0x203F`, **B** = `0x2080–0x20BF` (64 regs each)
  - `read_program_block(block)` / `write_program_block(block, values)`
  - `read_program_param(block, offset)` / `write_program_param(block, offset, value)`
- **Errors**
  - `check_errors(raise_on_error=True)` – checks status and PV error codes
  - Raises `OmegaControllerError` with descriptive message

### Serial Settings
- Some models use alternate status/PV addresses; this driver handles common variants

### Compatibility
- Tested on: **Omega CN7800**
- Expected to work with many CN-series models using the same Modbus map

### Roadmap - Contributions Welcome
- [ ] Test on additional Omega models
- [ ] Add remaining serial commands from the manual (alarms, limits, etc.)
data-generator-utils 0.1.0
Helpers for generating demo data
Requires Python: >=3.9
Keywords: data, generator, synthetic, sales, demo

# data-generator-utils

Utility functions for generating synthetic retail sales data and creating valid table names for use in databases and analytics tools.

## Installation

`pip install data-generator-utils`


## Requirements

- Python 3.9+
- numpy
- pandas (for the holiday calendar utilities)

These are installed automatically when you install the package.

## Usage

### 1. Generate synthetic sales data

The `generate_sales_data` function returns a list of dictionaries, each representing a row of simulated sales data.

```
from data_generator import generate_sales_data

records = generate_sales_data(
n_rows=10_000, # number of rows to generate
base_demand=1000, # upper bound for demand
day_range=100, # how many days back from now to sample
seed=123456789 # RNG seed for reproducibility
)
```


#### Output schema

Each record has the following fields:

- `row_id`: Random UUID string.
- `date`: Calendar date (Python `date`) within the last `day_range` days.
- `average_temperature`: Random float between 0 and 35 (degrees, arbitrary units).
- `rainfall`: Random float from an exponential distribution with mean ≈ 5.
- `weekend`: Boolean flag indicating whether `date` falls on Saturday or Sunday.
- `holiday`: Boolean flag indicating whether `date` is a US federal holiday (via `USFederalHolidayCalendar`).
- `price_per_kg`: Random float between 0.5 and 3.0.
- `demand`: Random float between 1 and `base_demand`.
- `month`: Integer month extracted from `date`.
- `total_spend`: `demand * price_per_kg`, rounded to 2 decimal places.

### 2. Generate valid table names

The `to_valid_table_name` function converts an arbitrary string into a safe, normalized table name.

```
from data_generator import to_valid_table_name

raw = "2024 Sales Report (US-West)"
safe = to_valid_table_name(raw)

print(safe) # e.g. "t_2024_sales_report_us_west"
```


#### Rules applied

- Converts the input to lowercase.
- Replaces any character not in `a–z`, `0–9`, or `_` with `_`.
- Collapses multiple underscores into a single underscore.
- Ensures the name is non-empty; falls back to `"t"` if needed.
- Ensures the name does **not** start with a digit; prefixes with `"t_"` if it does.
- Truncates to `max_length` characters (default `128`).
- Strips leading/trailing underscores; if stripping empties the name, falls back to `"t"` again.


## Development

- Format code with your preferred formatter (e.g., `black`).
- Run tests (if added) before publishing a new version.
- When updating behavior of public functions, bump the package version accordingly.
ledger-analytics 0.0.30
The Python interface to Korra's analytics infrastructure
Requires Python: >3.10

# LedgerAnalytics Python

`ledger-analytics` is the Python interface to [Korra](https://korra.com)'s remote
analytics infrastructure, providing remote compute access to state-of-art insurance data science models.

For more information, see the [documentation](https://ledger-investing-ledger-analytics.readthedocs-hosted.com/en/latest/)

## Looking for beta testers!

LedgerAnalytics is currently in beta phase, and is looking for beta testers
to try our models. If you'd like to learn more, reach out
to analytics@ledgerinvesting.com.
django-db-translate 0.3.0
A Django app with utilites to assist in project-wide translation
Requires Python: >=3.12

===================
django-db-translate
===================

django-db-translate is an app with utilites to assist in project-wide translation.

With django-db-translate, you can:

1. Select fields from the database to include in `.po` files using `makemessages`

2. Edit translations directly in the admin site

Note
    This app is a work in progress and may break unexpectedly.

Quick start (Database Translations)
-----------------------------------

1. Add "django_db_translate" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [
        ...,
        "django_db_translate",
    ]

2. Add your project's locale directory to your LOCALE_PATHS setting like this::

    LOCALE_PATHS = [
        BASE_DIR / 'locale'
    ]

3. Run ``python manage.py migrate`` to create the models.

4. Add a `translatable_fields` class attribute to any model with fields you want to be translatable::

    class MyModel(models.Model):
        translatable_fields = ('txt_field',)
        txt_field = models.CharField()

5. Run ``python manage.py makemessages --all --include-db-strings`` to generate the `.po` files


Quick start (Admin Translation Editing)
---------------------------------------

1. Follow steps 1-3 from `Quick start (Database Translations)`

2. Include the custom admin site inplace of the standard admin site in your project's URLconf::

    from django_db_translate import admin
    urlpatterns = [
        ..., # Your other URLs here
        path("admin/", admin.site.urls),
    ]

3. Add "django_db_translate.middleware.DBTranslateAdminMiddleware" to your MIDDLEWARE setting after any other Locale manipulating middlewares::

    MIDDLEWARE = [
        ...,
        'django_db_translate.middleware.DBTranslateAdminMiddleware'
    ]

4. Give the ``Dbtranslate | db translate permissions | Manage translations`` permission to any user that requires translation editing permissions