semvec/pypi-packages huggingface dataset:
kittychat 0.1.4
The cat's meow in AI conversation management.
Requires Python: >=3.11

# kittychat

The purrfect chat utils library!
With Kittychat, you'll be feline fine as a kittycat, since it ensures your threads stay within the LLMs token limits by whisking away old messages.

## install

`pip install kittychat`

## usage

```python
import logging

from kittychat.msg_dropping import MessageDropper
from kittychat.errors import NotEnoughTokens

thread = [
    {
        "content": "What is the weather like in Boston?",
        "role": "user",
    },
]
functions = [
    {
        "name": "get_current_weather",
        "description": "Get the current weather in a given location",
        "parameters": {
            "type": "object",
            "properties": {
                "location": {
                    "type": "string",
                    "description": "The city and state, e.g. San Francisco, CA",
                },
            },
            "required": ["location"],
        },
    }
]
model = "openai/gpt-3.5-turbo-0613"

msgd = MessageDropper(model)
length, max_tokens, is_too_big = msgd.check_thread_length(thread, functions)
if is_too_big:
    logging.warn(f"Thread too big: {length} tokens; max is {max_tokens} for model '{model}'.")
try:
    cropped_thread = msgd.run(thread, functions)
except NotEnoughTokens as e:
    raise YourPromptTooBigException(e.token_count, e.max_tokens, model)
return cropped_thread
```
untis-dif-file-writer 0.1.3
A library to write dif-files from Untis.
Requires Python: >=3.8

# untis-dif-file-writer

A simple Python package to write dif-files from Untis.

See https://platform.untis.at/HTML/WebHelp/de/untis/index.html -> search for "export dif" -> Export/Import DIF-Dateien.

## Installation

```pip install untis-dif-file-writer``` or ```poetry add untis-dif-file-writer```

## Usage

```
from untis_dif_file_writer.writers import write_dif_file, write_xml_file, write_all_dif_files, UntisFileNumber

# Write the students dif-file:
write_dif_file(UntisFileNumber.STUDENTEN, 
               "path/to/Untis.exe",
               "path/to/Untis-file",
               path_output_folder="path/to/output/folder"),
               output_file_name="students.TXT")

# Write the xml-file:
write_xml_file("path/to/Untis.exe", "path/to/Untis-file")
               
# Write all dif-files:
write_all_dif_files("path/to/Untis.exe", "path/to/Untis-file")
```

Index of columns in dif-files:

```
from untis_dif_file_writer.dif_files_columns import UntisFileKlassen

print(UntisFileKlassen.MIN_STUNDEN_PRO_TAG.value) 
```
PiAlarmAdapter 0.0.1
Manage contact sensors and send messages with state change to MQTT Broker
Requires Python: >=3.11

# PiAlarmAdapter

[![CI Pipeline](https://github.com/francescoscanferla/PiAlarmAdapter/actions/workflows/ci.yml/badge.svg)](https://github.com/francescoscanferla/PiAlarmAdapter/actions/workflows/ci.yml) [![Coverage Status](https://coveralls.io/repos/github/francescoscanferla/PiAlarmAdapter/badge.svg?branch=main)](https://coveralls.io/github/francescoscanferla/PiAlarmAdapter?branch=main) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/b7e2b28d810c4ff8873175f5bc5db68d)](https://app.codacy.com/gh/francescoscanferla/PiAlarmAdapter/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)

Application to manage contact sensors and send messages with state change to an MQTT Broker.

## Install
You can use pip directly through the command:
> pip install pi_alarm_adapter

## Settings

### Environment variables

| Variable             |  Default  | Info                                                           |
|----------------------|:---------:|----------------------------------------------------------------|
| **LOG_LEVEL**        |   INFO    | Level of logger. Valori possibili: DEBUG, INFO, WARNING, ERROR |
| **MQTT_BROKER_URL**  | 127.0.0.1 | IP address of the MQTT broker                                  |
| **MQTT_BROKER_PORT** |   1883    | Port number of the MQTT Broker                                 |
| **MQTT_USERNAME**    |   admin   | Username that can post messages on queues                      |
| **MQTT_PASSWORD**    |   admin   | password of the user above                                               |

For sensor configuration, add environment variables in the format:
SENSOR_<NOME_SENSORE>=<PIN_NUMBER>

Example: **SENSOR_BEDROOM=4**


## ToDo List
- [ ] move configuration from environment variables to a yaml file