semvec/pypi-packages huggingface dataset:
sprinko 0.9.0b4
sprinkles on scoop
Requires Python: >=3.8

# sprinko
sprinkles on scoop

## Development Status
Experimental/ Proof of concept

## Warning
This tool is very likely to allow arbitary code execution in its current stage of implementations. Use with high levels of caution.

## Features
[x] support quick code execution
[ ] saving profiles
[ ] generating file based on cmd
[ ] support live updating from gist and repos / remote
[ ] unifying a config.toml
[ ] more consistent security features
pyrseus 0.1.0
ExecutorCtx factory, its plugins, and various serial Executors
Requires Python: >=3.9
Keywords: Executor, ExecutorCtx, InlineExecutor, NoCatchExecutor, concurrent.futures, executor

Pyrseus: Serial Executors and the `ExecutorCtx` Factory
======================================================

Pyrseus extends Python's `concurrent.futures` asynchronous and concurrent
programming package with

 - a collection of non-concurrent executors for light workloads and
   troubleshooting,
 - `ExecutorCtx`, a factory for easily switching between different executors,
   and
 - a collection of ready-built `ExecutorCtx` plugins, supporting executors from
   [concurrent.futures](https://docs.python.org/3/library/concurrent.futures.html),
   [ipyparallel](https://ipyparallel.readthedocs.io),
   [loky](https://loky.readthedocs.io), [mpi4py](https://mpi4py.readthedocs.io),
   and itself. Where relevant, optional
   [cloudpickle](https://github.com/cloudpipe/cloudpickle)-enhanced plugins are
   also provided.

Installation
------------

Pyrseus supports Linux, macOS, and Windows.

To install just Pyrseus and no plugins for 3rd party executors, run:

    python -m pip install pyrseus

To ensure that the [ipyparallel](https://ipyparallel.readthedocs.io),
[loky](https://loky.readthedocs.io), and/or
[mpi4py](https://mpi4py.readthedocs.io) plugins are also ready to use, run a
command like the following, removing the names of any plugins you don't need::

    python -m pip install 'pyrseus[ipyparallel,loky,mpi4py]'

Note that Pyrseus will auto-detect those packages, so if they're installed
through other means, then the relevant Pyrseus plugins will be automatically
enabled.

For additional instructions, see the [installation
guide](https://pyrseus.readthedocs.io/en/latest/install.html).

Full Documentation
------------------

For full documenation, see the [Pyrseus
Documentation](https://pyrseus.readthedocs.io/). It includes installation
instructions, a detailed summary of all of the executor plugins, guidance for
writing your own plugins, API documenation, and several notebooks showing
example use cases.
term-ascii-diagram 0.0.5
Build ASCII diagrams in terminal using keyboard.
Requires Python: >=3.8

Build ASCII diagrams in terminal using keyboard.

[![asciicast](https://asciinema.org/a/653721.svg)](https://asciinema.org/a/653721)

## Install

```
pip install term-ascii-diagram
```

## Shortcuts

| Key    | Description |
| ------ | ----------- |
| `Arrow Keys` *or* `hjkl` | Move the cursor or selected object |
| `Shift`+`Arrow Keys` *or* `HJLK` | Resize selected object |
| `q` | Quit (with confirmation) |
| `s` | Save to file |
| `o` | Open from file |
| `b` | Add box |
| `c` | Add line |
| `a` | Add arrow |
| `d` | Delete selected object |
| `t` | Toggle sticky mode (whether moving boxes should move attached arrows/lines) |
| `Tab` | Select next object |
| `Shift`+`Tab` | Select previous object |
| `Enter` | Edit box text if selected, otherwise, select the object under cursor |
| `Esc` | Unselect current object |
| `Space` | Toggle the line/arrow orientation or box border |
Sphinx-AutoMark 0.0.0.3
A tool for generating Sphinx Autodoc's directive based on decorated functions and classes in code.
Requires Python: >=3.8

=========================================================
Sphinx-AutoMark
=========================================================
A tool for generating Sphinx Autodoc's directive based on decorated functions and classes in code.

---------------------
Links
---------------------
- `Releases <https://github.com/davidhozic/Sphinx-AutoMark/releases>`_
- Need help? Contact me in my `Discord server <https://discord.gg/DEnvahb2Sw>`_.

----------------------
Example
----------------------

.. code-block:: python

    import sphinx_automark as mark

    cat1 = mark.MultiCategory("API docs", "This is a test category 1\nJust to see if it works normally.", "./docs/source/")
    cat2 = mark.MultiCategory("Test category 2", "This is a test category 2\nJust to see if it works normally.")
    cat3 = mark.Category("Normal category", "This is a normal category, implemented inside a file.")

    cat1.add_categories(cat2)
    cat2.add_categories(cat3)

    @cat2.mark
    class TestCls:
        """
        This is a test class.
        """

    class TestCls2:
        """
        This is a test class.
        """

    cat2.mark(TestCls2)

    @cat3.mark(members=True, special_members=True, private_members=True, inherited_members=True)
    class TestCls3:
        """
        This is a test class.
        """
        def tesT(self):
            """
            Some method eh
            """
    @cat3.mark
    def good_fnc():
        """
        This is a good fnc.
        """
chromastone 0.2.6
A Python application for powering other python applications to send SMS messages globally with number validation and restrictions by Tarmica Chiwara
Requires Python: >=3.9


# Chromastone SMS App

Chromastone is a Python application designed to simplify the process of sending SMS messages. Utilizing a straightforward API, Chromastone ensures that destination numbers are validated and messages are efficiently delivered while adhering to specified constraints.

## Features

- Validation of destination numbers to ensure they are in international format without the '+' prefix.
- Enforcement of message length to not exceed 100 characters.
- Easy integration with existing Python applications.

## Installation

To use Chromastone, you need to install the required dependencies first. It is recommended to use a virtual environment:

```bash
python -m venv venv
source venv/bin/activate  # On Windows use `venv\Scripts\activate`
```

After activating the virtual environment, install the dependencies:

```bash
pip install requests pydantic
```

## Configuration

Before you can start sending SMS messages, ensure you have an API key from the SMS service provider. You will need to replace 'your_api_key_here' in the code with your actual API key.

## Usage

To send an SMS using Chromastone, instantiate the `Chromastone` class with your API key and call the `send_sms` method with the source number, destination number, and message:

```python
from chromastone import Chromastone

chromastone = Chromastone(api_key='your_api_key_here')
chromastone.send_sms(source_number='1234567890', destination_number='263771123456', message='Hello, world!')
```

Ensure the destination number is in the correct format and the message does not exceed 100 characters.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Contributions

Contributions are welcome! Please feel free to submit a pull request or open an issue for any bugs or feature requests.

## Acknowledgments

- Thanks to the Pydantic library for providing robust data validation.
- Gratitude to the Requests library for simplifying HTTP requests in Python.
speech_user_interface 0.2.0
A universal speech user interface for wrapping applications to provide them with a user interface that uses speech rather than text commands or traditional user interfaces
Requires Python: <4.0,>=3.11

# speech_user_interface

A universal speech user interface for wrapping applications to provide them with a user interface that uses speech rather than text commands or traditional user interfaces

You need to define a function to run like this:

```
def default_function_to_run(input_text: str):
    reponse_text = send_text_to_chatgpt(input_text)
    speak_text(reponse_text)


main(function_to_run=default_function_to_run):

```

This one is configured by default but it can be anything. We run in a cycle
until "exit the program" is said and that exits the infinite loop. We just keep
reading input and passing that to the `function_to_run` this can do anything
with this input.

If you want to use the default ChatGPT integration make sure that you create
a `.env` file which defines the `OPENAI_API_KEY` environment variable with
a reference to your OpenAI API key.
shelve-cache 0.0.4
Persistant decorator
Keywords: python, cache, shelve, decorator, sockets


---

# Shelve Caching Decorator

## Overview

This Python package provides a decorator leveraging Shelve for persistent caching. The decorator allows efficient caching of function results, improving performance by storing data persistently between program executions.

## Features

- **Persistent Caching:** Utilizes Shelve for persistent storage of cached function results.
- **Efficient Performance:** Caches function results to avoid recomputation, enhancing performance for repeated calls.
- **Easy Integration:** Simple decorator syntax for easy integration with existing functions.
- **Customizable:** Easily configurable to cache functions with different argument combinations.

## Installation

You can install the package using pip:

```bash
pip install shelve-caching-decorator
```

## Usage

1. **Decorator Application:** Use the `@persistent_cache` decorator to cache function results.

    ```python
    from shelvecache import persistent_cache

    @persistent_cache("cache.db")
    def expensive_operation(x, y):
        # Your expensive computation here
        return x * y

    result = expensive_operation(2, 3)  # Function result cached
    ```

2. **Persistent Storage:** The cached results are stored in the specified Shelve file ("cache.db" in the example above), ensuring persistence between program executions.

## Examples

Check the [examples](examples/) directory for detailed usage examples.

## Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

---

Feel free to customize and expand upon this README as needed for your repository!
mlh 0.1.3
This package provides helper utilities for machine learning tasks. One major utility is calculation of weight of evidence

# Machine Learning Helper

This package usage multiple algorithms and parameters to accomodate different set of use cases to help in creating multiple machine learning algorithms.

## 1.0 woe (Weight of Evidence):
This function will help to calculate Weight of Evidence and Information Value, the charts can be displayed and coarse classing can also be done.

### 1.1 Parameters:
------------------------------------------------------------
* **max_bin**: int
    Maximum number of bins for numeric variables. The default is 10
* **iv_threshold**: float
    Threshold value for Information Value. Variables with higher than threshold will be considered for transformation
* **ignore_threshold**: Boolean
    This parameter controls whether the defined threshold should be considered or ignored. The default is 'True'

------------------------------------------------------------
### 1.2 Returns:
DataFrame having weight of evidence of each column along with the target variable


------------------------------------------------------------
### 1.3 Approach:

1. Create an instance of woe
     my_woe = woe()

2. Call fit method on the defined object by passing on dataframe and the target variable name
     my_woe.fit(df,target)

3. Call the transform method
    transformed_df = my_woe.transform()

------------------------------------------------------------
## Example

### Create Sample DataFrame
```python
from mlh import woe
import pandas as pd
import numpy as np
import random

seed=1456
np.random.seed(seed)
random.seed(seed)
```
```python
rows = 1000
```
```python
y = random.choices([0,1],k=rows,weights=[.7,.3])
```
```python
x1 = random.choices(np.arange(20,40),k=rows)
x2 = np.random.randint(1000,2000,size=rows)
x3 = random.choices(np.arange(1,100),k=rows)
x4 = random.choices(['m','f','u'],k=rows)
x5 = random.choices(['a','b','c','d','e','f','g','h'],k=rows)
```
```python
df = pd.DataFrame({'y':y,'x1':x1,'x2':x2,'x3':x3,'x4':x4,'x5':x5})
```
```python
df.head()
```
### Fitting and prediction

**Create Instance of Weight of Evidence Package**
```python
my_woe = woe()
```
**Fit the data with created instance**
```python
my_woe.fit(df,'y')
```
**Display the relevant charts**
```python
my_woe.getWoeCharts()
```
**Merge values of X3 Variable at 1 and 2 indices using the Weight of Evidence chart from the first Iteration**
```python
my_woe.reset_woe(2,(1,2),1)
```
**Get latest Iteration Information Value**
```python
my_woe.get_IV()
```
**Replace the original values in the Dataframe with Weight of Evidence**
```python
transformed_df = my_woe.transform()
```
variable-polyline-buffer 0.1.7
A function for calculating a buffer around a polyline, defining the contours of a line with variable thickness.

# Variable polyline buffer

## Description

`variable_polyline_buffer` is a Python library for calculating a buffer around a polyline, defining the contours of a line with variable thickness. This function supports various applications in geographical information systems, computer graphics, and spatial analysis where dynamic line thickness is required.

## Installation

To install this package, use pip:

```bash
pip install variable_polyline_buffer
```

## Usage

Here is a simple example of how to use Variable-Polyline-Buffer:

```python
from variable_polyline_buffer import generate_polyline_buffer
import matplotlib.pyplot as plt

# Example data: coordinates of polyline points and distance for each segment
points = [(0, 0), (2, 0.5), (3, -0.5), (4, 1)]
distances = [1, 0.5, 0.2]  # Thickness of the individual segments

# Generate contours
left_contour, right_contour = generate_polyline_buffer(points, distances)

# Plot the contours
plt.plot([p[0] for p in points], [p[1] for p in points], "C0")
plt.plot([p[0] for p in left_contour], [p[1] for p in left_contour], "k--")
plt.plot([p[0] for p in right_contour], [p[1] for p in right_contour], "k--")
plt.axis("equal")
```

![Output image](https://github.com/stephtr/variable-polyline-buffer/raw/main/imgs/1.svg)

Replace points and dists with your polyline data and corresponding thicknesses.

Via supplying tuples as dists, one can also generate different thicknesses on the curve's two sides:

```python
points = [(0, 0), (2, 0.5), (3, -0.5), (4, 1)]
distances = [(0.1, 1), (0.1, 0.5), 0.2]
```

![Output image](https://github.com/stephtr/variable-polyline-buffer/raw/main/imgs/2.svg)

By supplying `False` as distance, one can taper between segments with different widths:

```python
points = [(0, 0), (1, 0), (2, 0), (3, 0)]
distances = [(0.5, 0), (False, 0), (0.2, 0)]
```

![Output image](https://github.com/stephtr/variable-polyline-buffer/raw/main/imgs/3.svg)

## Requirements

Variable-Polyline-Buffer requires the following Python libraries:

- NumPy

## License

This project is licensed under the MIT License.
ccnuacm-datamocker 0.0.6
A data mocking library for CCNU ACM

# CCNUACM DataMocker

## Description

This project is a data mocker for CCNUACM. It is written in Python. Source code is available
on our [Github repo:CCNUACM_DataMocker](https://github.com/CCNU-ACM-Official/CCNUACM_DataMocker.git).

## Installation

To install the necessary dependencies, run the following command:

```bash
pip3 install ccnuacm-datamocker -U
```

## Usage

Following is a basic example of how to use the data mocker. More examples are avaliable [here](https://github.com/CCNU-ACM-Official/CCNUACM_DataMocker/tree/master/examples).

```python
import ccnuacm_datamocker as dm
from ccnuacm_datamocker.data_model import *
import os

dm.set_seed(0)
dm.set_work_dir(".")
dm.set_compiler("D:/mingw/bin/g++.exe")

os.makedirs("./std", exist_ok=True)

open("./std/APlusB.cpp", "w").write(
    """
#include <iostream>

int32_t main() {
  int64_t T;
  std::cin >> T;
  while (T--) {
    int64_t a, b;
    std::cin >> a >> b;
    std::cout << a + b << '\\n';
  }
  return 0;
}
"""
)

ds = DataSet(name="APlusB", std_path="./std/APlusB.cpp")

ds.add(
    RandomInt(low=1, high=100)
    .repeat(times=2, sep=" ")
    .repeat(times=10, sep="\n", show_times=True, h_sep="\n"),
    reputation=2,
)

ds.show()

ds.run()
```



## Contributing

Contributions are welcome. Please submit a pull request or create an issue to discuss the changes you want to make.

## License

This project is licensed under the [MIT License](https://github.com/CCNU-ACM-Official/CCNUACM_DataMocker/blob/master/LICENSE).

## Contact

If you have any questions, please feel free to post an issue.
py-env-parser-light 0.1
A Simple env file parser
Requires Python: >=3.6

# Environment Controller

`EnvironmentController` is a Python class designed to manage environment variables for your application. It provides a simple and efficient way to parse and handle environment variables from a `.env` file.

## Features

- **Easy Parsing**: The `parse_env_file` method reads an environment file and returns a dictionary of the environment variables. It handles comments and empty lines gracefully, and warns about lines that don't follow the expected format.

- **Flexible**: It's designed to be used in any Python application that needs to manage environment variables.

- **Error Handling**: It provides clear error messages for lines in the `.env` file that don't follow the expected `KEY=VALUE` format.

Remember to always keep your `.env` file out of version control to avoid exposing sensitive information.

## Installation

You can install the package using pip:


pip install py_env_parser_light

# Usage

from py_env_parser_light import EnvironmentController

### Create an instance of the controller
controller = EnvironmentController()

### Parse the .env file
env_vars = controller.parse_env_file('.env')

### Now you can access your environment variables
print(env_vars['MY_VARIABLE'])