semvec/pypi-packages huggingface dataset:
smem 1.0.1
A Python library that is used to handle interprocess communication platform independently in Python.
Requires Python: >=3.8

# SMem
<img src="https://img.shields.io/github/v/release/hlpdev/SMem" alt=""> <img src="https://img.shields.io/badge/3.6-%2330648e?label=python" alt="">

The SMem library is used to handle **interprocess communication** ***(IPC)*** 
platform independently in Python.

## Usage
> [!NOTE]
> You must provide a name for the shared memory instance.
> 
> The size of the shared memory defaults to 1024
> 
> The create flag on the shared memory instance defaults to false, 
> so make sure you ensure that an instance of the shared memory exists!

#### Creating a shared memory instance:
```python
from smem.smem import SMem

# Create the SMem instance with the "create" flag 
# enabled and a specified "size" of 1024
shared_memory = SMem("my_shared_memory", create=True, size=1024)
```

#### Attaching to a shared memory instance:
Useful for reading an existing shared memory instance.
```python
from smem.smem import SMem

# Create the SMem instance with the "size" flag set to 1024
# (the same as when we created it)
shared_memory = SMem("my_shared_memory", size=1024)
```

#### Writing to shared memory
Writing to shared memory will overwrite the existing value.
```python
# Assume "shared_memory" contains an active instance of SMem
data = b"This is my data to write!"
shared_memory.write(data)
```

#### Reading shared memory
```python
# Assume "shared_memory" contains an active instance of SMem
data = shared_memory.read()
```

#### Closing an instance
Closing an instance that created the shared memory file:
```python
# Assume "shared_memory" contains an active instance of SMem
# that created the shared memory file
shared_memory.close()
shared_memory.unlink()
```
Closing an instance that did not create the shared memory file:
```python
# Assume "shared_memory" contains an active instance of SMem
# that did not create the shared memory file
shared_memory.close()
```
math-rounding 1.0.1
The package contains mathematical rounding function
Requires Python: >=3.8

# Mathematical rounding in Python

This package has one purpose: fast mathematical rounding of numbers.

## Installation

Use the following command to install the package:

```bash
pip install math-rounding
```

The package can use `numba` to increase speed of the calculations.
If you want to install it with numba, you can use the following command:

```bash
pip install math-rounding[numba]
```

or just install `numba` separately.

## Usage

The main function of the package `math_rounding` has the following signature:

```py
def math_rounding(n: Number, p: int = 0) -> float:
    ...
```
where:
* `n` is the number to round;
* `p` is integer number that specifies the position to which rounding will be performed.

`p` could be a positive number or a negative number. It represents the position in the number from the dot:
* when it's equal to `0` (*default*), the rounding will be performed to integer;
* when it's positive, it represents the position in fractional part of the number;
* when it's negative, it represents the position in integer part of the number.

### Example

```py
from math_rounding import math_rounding

print(math_rounding(0.5))      # 1.0
print(math_rounding(-0.5))     # -1.0
print(math_rounding(1.1))      # 1.0
print(math_rounding(0.05, 1))  # 0.1
print(math_rounding(5, -1))    # 10.0
print(math_rounding(15, -1))   # 20.0
```
iana-bcp47 0.1.2
A Python package to validate BCP47 language tags
Requires Python: >=3.9

# IANA-BCP47 (BCP47 Validator)

This project provides a Python implementation of a [BCP47](https://tools.ietf.org/html/bcp47) language tag validator. It validates language tags based on the IANA Language Subtag Registry and ensures compliance with BCP47 specifications. The validator supports checking for redundant tags and validating custom language codes using dictionaries of subtags.

## Features

- Validates BCP47 language tags with dictionaries derived from the IANA Language Subtag Registry.
- Supports validation for the following subtag types:
  - `language`
  - `extlang`
  - `script`
  - `region`
  - `variant`
  - `redundant`
- Provides detailed descriptions of valid language tags.
- **Returns `None` for invalid tags.**

## How It Works

The project uses a generated Python module (`bcp47.py`) containing dictionaries for each type of subtag. Each language tag is validated as follows:
1. The first subtag must match a valid language code.
2. Subsequent subtags are validated against dictionaries for `extlang`, `script`, `region`, and `variant`.
3. Redundant tags (full language tags) are checked separately.
4. Return a tuple with two elements:
    - The first element is a boolean indicating whether the tag is valid.
    - The second element is a string describing the language tag or error message if the tag is invalid.

## Usage

> [!IMPORTANT]
>
> The IANA-BCP47 library validates whether a given string conforms to the BCP 47 standard format. However, it does not verify whether the string represents a practical or commonly used language code. For instance, `ru-US` is a valid BCP 47 format but is not a language code typically used in real-world applications.


### Validate a BCP47 Language Tag

Use the `validate_bcp47` function to validate a language tag and retrieve its description.

```console
pip install iana-bcp47
```

```python
from iana_bcp47.validator import validate_bcp47

# Example usage
tags = ["en", "en-US", "zh-Hant", "zh-Hant-CN", "invalid-tag", 'zh-US']

for tag in tags:
    valid, msg = validate_bcp47(tag)
    print(f"Tag '{tag}' is {'valid: ' + msg if valid else 'invalid'}.")
```

### Output Example

```
Tag 'en' is valid: English.
Tag 'en-US' is valid: English - United States.
Tag 'zh-Hant' is valid: traditional Chinese.
Tag 'zh-Hant-CN' is valid: PRC Mainland Chinese in traditional script.
Tag 'invalid-tag' is invalid.
Tag 'zh-US' is valid: Chinese - United States.
```

## License

This project is licensed under the MIT License. See the LICENSE file for details.
supergood 2.1.2
The Python client for Supergood
Requires Python: >=3.7

# Python

The Supergood Python client connects Supergood to your Python application. Follow these steps to integrate with the Python client.

## 1. Install the Supergood library

```bash
pip install supergood
```

## 2. Initialize the Supergood Library

**Environment variables**

Set the environment variables `SUPERGOOD_CLIENT_ID` and `SUPERGOOD_CLIENT_SECRET` using the API keys generated in the [getting started instructions](../getting-started.md).

Initialize the Supergood client at the root of your application, or anywhere you're making API calls.

```python
from supergood import Client

Client.initialize()
```

**Passing keys**

You can also pass the API keys in manually without setting environment variables.

Replace `<CLIENT_ID>` and `<CLIENT_SECRET>` with the API keys you generated in the [getting started instructions](../getting-started.md).

```python
from supergood import Client

Client.initialize(client_id="<CLIENT_ID>", client_secret_id="<CLIENT_SECRET>")
```

Note: If your application makes use of the `multiprocessing` library to make API calls, you'll need to initialize a client for each `Process`.&#x20;

## 3. Monitor your API calls

You're all set to use Supergood!

Head back to your [dashboard](https://dashboard.supergood.ai) to start monitoring your API calls and receiving reports.

## Links

* [Supergood PyPi Project](https://pypi.org/project/supergood/)
* [Supergood\_py Source Code](https://github.com/supergoodsystems/supergood-py)