semvec/pypi-packages huggingface dataset:
charmlibs-interfaces-sloth 0.1.0
Sloth integration for Juju charms - SLO (Service Level Objective) management with the Sloth operator.
Requires Python: >=3.10

# charmlibs.interfaces.sloth

Sloth integration library for Juju charms, providing SLO (Service Level Objective) management with the Sloth operator for generating Prometheus recording and alerting rules.

## Features

- **Provider/Requirer pattern**: Enables charms to share SLO specifications with Sloth
- **Raw YAML interface**: Provider passes raw YAML strings; validation happens on requirer side
- **Automatic topology injection**: Optionally inject Juju topology labels into Prometheus queries
- **Multi-service support**: Provide SLO specs for multiple services in a single YAML document

## Getting started

To install, add `charmlibs-interfaces-sloth` to your Python dependencies. Then in your Python code, import as:

```py
from charmlibs.interfaces.sloth import SlothProvider, SlothRequirer
```

### Provider Side

```python
from charmlibs.interfaces.sloth import SlothProvider

class MyCharm(ops.CharmBase):
    def __init__(self, *args):
        super().__init__(*args)
        self.sloth_provider = SlothProvider(self)

    def _provide_slos(self):
        slo_config = '''
        version: prometheus/v1
        service: my-service
        slos:
          - name: requests-availability
            objective: 99.9
            sli:
              events:
                error_query: 'sum(rate(http_requests_total{status=~"5.."}[{{.window}}]))'
                total_query: 'sum(rate(http_requests_total[{{.window}}]))'
        '''
        self.sloth_provider.provide_slos(slo_config)
```

### Requirer Side

```python
from charmlibs.interfaces.sloth import SlothRequirer

class SlothCharm(ops.CharmBase):
    def __init__(self, *args):
        super().__init__(*args)
        self.sloth_requirer = SlothRequirer(self)

    def _on_config_changed(self, event):
        # Get validated SLO specs from all related charms
        slos = self.sloth_requirer.get_slos()
        # Process SLOs and generate rules
```

## Documentation

For complete documentation, see the [charmlibs documentation](https://documentation.ubuntu.com/charmlibs/reference/charmlibs/interfaces/sloth).

## Contributing

See [CONTRIBUTING.md](https://github.com/canonical/charmlibs/blob/main/CONTRIBUTING.md) in the repository root.
img-compress-liuhuige 0.0.1
一个主流图片压缩方案的自动化脚本（利用 tinify 实现）
Requires Python: >=3.6

一个主流图片压缩方案的自动化脚本（利用 tinify 实现）

### 实现三种图片输入的方式
* 用户可以指定需要压缩的图片文件名称（支持多个图片文件，使用空格隔开）
* 如果用户未指定图片，默认压缩当前文件夹下所有的 Jpg/jpeg/png/webp 图片

### 支持图片的尺寸调整
* 输入宽度和高度（比如 600 800），表示按比例缩小图片，使其适合给定的尺寸
* 输入宽度（比如 600 0），表示按确定的宽度调整图片，高度适配
* 输入高度（比如 0 880），表示按确定的高度调整图片，宽度适配
* 如未输入宽度和高度，则表示按照原始分辨率来压缩图片

### 调用方法
import img_compress
img_compress.tinify.key = "" # 请在https://tinify.cn/developers申请密匙
img_compress.compress() # 可以指定多个图片文件，未指定则压缩当前路径下的图片

注意：需先到tinfiny官网申请API密匙 -> [传送门](https://tinify.cn/developers)
retaildata 0.1.5
Unified download and managing of real-world retail datasets for analysis and benchmarking.
Requires Python: >=3.11

# RetailData

A unified interface for fetching and preparing retail datasets for benchmarking and analysis.

## Features

- **Unified API**: Fetch datasets from various providers (HTTP, Kaggle, Hugging Face, UCI, OpenML) with a single command.
- **Secure Credentials**: Integrated support for Kaggle and Hugging Face API keys.
- **Data Benchmark Pack**: Curated retail datasets (Favorita, Rossmann, Instacart, M5, Olist, and more).
- **Processing Pipeline**: Automatic conversion to high-performance Parquet optimized for Polars.
- **Cache Management**: Programmatic disk usage tracking and clearing.

## Installation

```bash
pip install retaildata
```

Or using `uv` (recommended for development):
```bash
uv pip install -e .
```

## Quick Start

### CLI

1. **List available datasets**:
   ```bash
   retaildata list
   ```

2. **Download a dataset**:
   ```bash
   retaildata get test_http
   ```

3. **Download with Preparation (Parquet)**:
   ```bash
   retaildata get online_retail_ii --prepare
   ```

4. **Manage Credentials (e.g. Kaggle)**:
   ```bash
   retaildata auth set kaggle --file ~/.kaggle/kaggle.json
   ```

5. **Clean Up**:
   ```bash
   retaildata rm test_http
   retaildata purge --all
   ```

### Python API

```python
import retaildata.api as rd
import polars as pl
from pathlib import Path

# Download and prepare dataset
rd.api.download("online_retail_ii", prepare=True)

# Load efficiently with Polars
df = pl.scan_parquet("~/.local/share/retaildata/prepared/online_retail_ii/*.parquet").collect()
print(df.head())
```

## Supported Datasets

- `online_retail_ii`: UK-based online retail transactions.
- `olist`: Brazilian e-commerce dataset.
- `m5`: Walmart time-series forecasting.
- `store_sales`: Corporación Favorita (Ecuador) store sales.
- `rossmann`: Rossmann store sales benchmarks.
- `instacart`: Online grocery basket analysis.
- `online_retail_uci`: Classical transactions dataset (UCI).
- `credit_approval_openml`: Financial benchmarking (OpenML).

See `retaildata list` for the full registry.

## License

This package is licensed under the MIT License. Individual datasets may have their own licenses.
kntp-lib 0.1.1
KRISS-based NTP server analysis and recommendation library
Requires Python: >=3.10

# kntp-lib

KRISS (Korea Research Institute of Standards and Science) 기준으로  
NTP 서버의 정확도, 지연, 안정성을 분석하고 추천하는 Python 라이브러리입니다.

## Features

- NTP 4-timestamp 공식 기반 offset / delay 계산
- 서버별 통계 분석 (평균, 표준편차)
- KRISS 기준 상대 오프셋 비교
- 점수 기반 랭킹 및 등급화 (A–D)
- 자동 추천 서버 선택

## Usage

```python
import kntp_lib as kntp

stats = kntp.collect_stats(kntp.DEFAULT_SERVERS, samples=5)
ranked = kntp.rank_servers(stats, base=kntp.DEFAULT_BASE)

best = kntp.recommend(ranked)
print(best)
strique-proto-schema 32.1.23
API contracts and Data Transfer Objects (DTO) in the form of Protocol Buffers for Strique binaries.
Requires Python: >=3.7

# Strique Proto Schema
API contracts and Data Transfer Objects(DTO) in the form of Protocol Buffers for Strique binaries.

Protobuf provides a language agnostic way to define schema and contracts. The protbufs genertae language specific code during compilation and the language specific ojects are packaged and exported to different package registries.

## Versions
* `*.*.*-rc.*` - This is a snapshot version. Never use this in prod. This is for intermediate releases.
* `*.*.*` - This is for prod version.

## Java - Use maven strique package
Add strique proto package as a dependency in your pom.xml [using this package guide](https://github.com/DigiStrique-Solutions/strique-proto-schema/packages/2108552).

## Typescript/Javascript - Use npm strique package
* Create a Personal access token from developer settings of your github and give it read permissions to the package.
* Add following to `~/.npmrc`.
```
@digistrique-solutions:registry=https://npm.pkg.github.com/
//npm.plg.github.com/:_authToken=<Personal access token from above step>
```
* Use [this guide](https://github.com/DigiStrique-Solutions/strique-proto-schema/pkgs/npm/strique-proto-schema) to add the package to your TS/JS project.

## Python - Use pypi strique package
* Before installing the package, make sure you have Python and pip (Python's package installer) installed on your system.
* Install the Strique proto package: 
Use pip to install the strique-proto-schema package by running the following command:
```
pip install strique-proto-schema
```
modern-di-litestar 2.7.0
Modern-DI integration for LiteStar
Requires Python: <4,>=3.10
Keywords: DI, LiteStar, dependency injector, ioc-container, python

"Modern-DI-LiteStar"
==
[![Test Coverage](https://codecov.io/gh/modern-python/modern-di-litestar/branch/main/graph/badge.svg)](https://codecov.io/gh/modern-python/modern-di-litestar)
[![MyPy Strict](https://img.shields.io/badge/mypy-strict-blue)](https://mypy.readthedocs.io/en/stable/getting_started.html#strict-mode-and-configuration)
[![Supported versions](https://img.shields.io/pypi/pyversions/modern-di-litestar.svg)](https://pypi.python.org/pypi/modern-di-litestar)
[![downloads](https://img.shields.io/pypi/dm/modern-di-litestar.svg)](https://pypistats.org/packages/modern-di-litestar)
[![GitHub stars](https://img.shields.io/github/stars/modern-python/modern-di-litestar)](https://github.com/modern-python/modern-di-litestar/stargazers)

Integration of [Modern-DI](https://github.com/modern-python/modern-di) to LiteStar

Usage example: [litestar-sqlalchemy-template](https://github.com/modern-python/litestar-sqlalchemy-template)

## 📚 [Documentation](https://modern-di.readthedocs.io)
django-admin-user-favorites 0.0.1
Pin your favorite models in django admin.
Requires Python: >=3.8

# Django Admin User Favorites

Pin frequently used models to the top of your django admin panel per user.

Helpful for support staff who utilise the django admin in large apps with lots of models.

Here's an example of it applied to the django 'polls' tutorial app.

![Demo of Pinned Models](docs/demo.png)

## Install

```
python -m pip install django_admin_user_favorites
```

## Setup

1. Add 'django_admin_user_favorites' to your INSTALLED_APPS.
Note: *must be listed before 'django.contrib.admin' or other third party admin apps*

2. Add 'django_admin_user_favorites.urls' to your apps `url.py`

```
path('', include('django_admin_user_favorites.urls'))
```

3. In TEMPLATES -> OPTIONS -> context_processors:
Ensure `django.template.context_processors.request` is present.

And you're done! Now in django admin there should be a small pin next to models and you can click this pin to save a model to the top of your admin page. If you have any problems with the pin you can also do this via django admin itself.
strava-client-cli 0.1.1
CLI tool for interacting with the Strava API
Requires Python: >=3.11
Keywords: cli, cycling, fitness, running, strava

# strava-cli

CLI tool for interacting with the Strava API.

## Install

```bash
uv pip install -e .
```

## Setup

1. Create a Strava API app at https://www.strava.com/settings/api
2. Set callback URL to `http://localhost`
3. Run `strava auth` and follow the prompts

## Commands

| Command | Description |
|---------|-------------|
| `strava auth` | OAuth2 setup flow |
| `strava profile` | Show athlete profile |
| `strava stats` | Athlete stats summary |
| `strava activities` | List recent activities |
| `strava activity <id>` | Detailed activity view |
| `strava export` | Bulk export activities |

## Usage

```bash
# List last 10 activities
strava activities --limit 10

# Filter by type and date
strava activities --type Run --after 2024-01-01

# View a specific activity
strava activity 12345678

# Export activities to JSON
strava export --output ./export --format json --after 2024-01-01
```

## Token Management

Tokens are stored in `~/.config/strava-cli/tokens.json` and automatically refreshed when expired (every 6 hours).
octopus-sensing 5.0.1
Library for recording data synchronously from different physiological sensors
Requires Python: <3.13,>=3.11
Keywords: sensors, eeg, gsr, recorder

<h2 align="center">Octopus Sensing</h2>
<p align="center">
  <img src="https://octopus-sensing.nastaran-saffar.me/_static/octopus-sensing-logo-small.png" alt="Octopus Sensing Logo">
</p>
<p align="center">
  <img src="https://img.shields.io/github/workflow/status/octopus-sensing/octopus-sensing/Python%20Check?label=checks" alt="GitHub Workflow Status">
  <img src="https://img.shields.io/codecov/c/gh/octopus-sensing/octopus-sensing" alt="Codecov">
  <img src="https://img.shields.io/pypi/v/octopus-sensing" alt="PyPI">
  <img src="https://img.shields.io/pypi/l/octopus-sensing" alt="PyPI - License">
</p>

Octopus Sensing is a tool to help you run scientific experiments that involve recording data synchronously from
multiple sources in human-computer interaction studies. You write steps of an experiment scenario, for example showing a stimulus and then a questionnaire. The tool takes care of the rest.

It can collect data from multiple devices such as OpenBCI EEG headset, Shimmer sensor (GSR and PPG),
Video and Audio and so forth simultaneously. Data collection can be started and stopped synchronously across all devices.
Collected data will be tagged with the timestamp of the start and stop of the experiment, the ID of
the experiment, etc.

The aim is to make the scripting interface so simple that people with minimum or no software
development skills can define experiment scenarios with no effort.
Also, this tool can be used as the base structure for creating real-time data processing systems like systems with capabilities of recognizing emotions, stress, cognitive load, or analyzing human behaviors.


**To see the full documentation visit the [Octopus Sensing website](https://octopus-sensing.nastaran-saffar.me/).**

When using the package in your research, please cite:
-----------------------------------------------------

Saffaryazdi, N., Gharibnavaz, A., & Billinghurst, M. (2022). Octopus Sensing: A Python library for human behavior studies. Journal of Open Source Software, 7(71), 4045.

Main features
--------------

* Controls data recording from multiple sources using a simple unified interface
* Tags an event on collected data, such as the start of an experiment, and events during the experiment, etc.
* Can show stimuli (images and videos) and questionnaires
* Monitoring interface that visualizes collected data in real-time
* Offline visualization of data from multiple sources simultanously

Copyright
---------
Copyright © 2020-2023 Nastaran Saffaryazdi, Aidin Gharibnavaz

This program is free software: you can redistribute it and/or modify it under the terms of the GNU
General Public License as published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

See [License file](https://github.com/nastaran62/octopus-sensing/blob/master/LICENSE) for full terms.