semvec/pypi-packages huggingface dataset:
essential-helpers 0.0.5
Provides basic functions for argument passing, encryption, shell execution and file management

<p align="center">
    <img src="https://img.shields.io/badge/status-fully%20functional-brightgreen">
</p>

<h1 align="center">🧹 Essential Helpers 🧹</h1>


## Install

```shell
pip install essential-helpers
```

## Usage

```python
import ess_helpers 
```

### Argument Parsing

Uses the argparse built-in module to parse arguments ran alongside your script.

- Assign your args
```python
from essential-helpers.arguments import ArgumentParser

parser = ArgumentParser()

# Strings
string_arg: tuple = ("-s", "--string-example")
string_help: str = "This is an example string argument, pass in a string after this argument."
parser.add_string_argument(string_arg, string_help)

# Ints
int_arg: str = "-i"
int_help: str = "This is an example int argument, pass in an int after this argument."
parser.add_int_argument(int_arg, int_help)

# Bools
bool_arg: frozenset = {"-b", "--bool"}
bool_help: str = "This is an example bool argument, passing this will set this bool to true."
parser.add_bool_argument(bool_arg, bool_help)
```
*You can pass in a str ("-eg") or a tuple/list/set (["-eg", "--example"])

- Reference them to see if they have been passed in and what values they hold
```python
string_value: str = parser.get_arg("s")
int_value: int = parser.get_arg("int")
is_bool: bool = parser.get_arg("bool")
```
```python
all_args: dict = parser.get_all_args()
string_value: str = all_args.get("s")
int_value: int = all_args.get("int")
is_bool: bool = all_args.get("bool")
```

### Encryption

### Shell Execution

### File Management
pandas-accumulate 0.1.0
Accumulate Pandas series
Requires Python: >=3.8

# `pandas-accumulate`: accumulate values along Pandas series

This package provides one function that allows accumulating values along a
Pandas series very similar to `cumsum` and `cumprod` but allowing also other
operators like `|`.

# Usage examples

## `cumsum`

Replicate cumsum:

```python
>>> import operator
>>> import pandas as pd
>>> from pandas_accumulate import accumulate
>>> s = pd.Series([1, 2, 3])
>>> accumulate(s, operator.add)
0    1
1    3
2    6
dtype: int64
```

## cumulative `unique()`

Collect the unique values cumulatively. _Note_: You need to pass an
`initial` value for the accumulation in this example:
```python
>>> s = pd.Series([1,2,1,3,2])
>>> def f(acc, v):
...     return acc | {v}
>>> accumulate(s, f, initial=set())
0          {1}
1       {1, 2}
2       {1, 2}
3    {1, 2, 3}
4    {1, 2, 3}
dtype: object
```

## cumulative `nunique()`

If you're interested only in the number of unique values, just call `len` at
the end:

```python

>>> accumulate(s, f, initial=set()).map(len)
0    1
1    2
2    2
3    3
4    3
dtype: int64
```
redisgrpc 0.4
A small production ready client library that emulates redis and used gRPC for communication
Keywords: redis,gRPC

---

# Redis gRPC ⚡️

by Gautam Sharma https://gsharma.dev

Redis gRPC ⚡️ is a client library that emulates Redis-like features by leveraging gRPC communication. It provides a lightweight and efficient way to interact with a Redis-like server implemented using gRPC, offering developers a fast and seamless experience.

## Features

- Emulates Redis-like functionality
- Utilizes gRPC for communication
- Written in Python for ease of use and integration
- Lightweight and efficient

## Installation

To install the redisgrpc Python client library, you can use pip:

```bash
pip install  redisgrpc==0.4
```

## Usage

Here's an example demonstrating how to use the  redisgrpc client library:

```python
from __future__ import print_function
import logging
from  redisgrpc import redisgrpc as rg


def run():
    # Initialize the Client with the server port
    c = rg.Client(50051)
    # Initialize the connection
    c.init_connection()
    
    # Perform some Redis-like operations
    for idx in range(1, 10):
        k = input("Set Key: ")
        v = input("Set Value: ")
        c.set(k, v)
        # Get the cached value back
        cached_val = c.get(k)
        print("Cached value of key {} is {}".format(k, cached_val))

if __name__ == "__main__":
    # Configure logging
    logging.basicConfig()
    # Run the example
    run()
```

## About

The [redis-grpc-server](https://github.com/gautam-sharma1/redis-grpc-server) is a library written purely in C++, utilizing gRPC as its communication layer. Despite its small size, this library is powerful and suitable for use in production environments. The aim is to provide developers with the best possible experience while maintaining extreme speed and efficiency.

## Contributing

Contributions to redisgrpc are welcome! Whether it's reporting bugs, suggesting new features, or contributing code, your input is valuable.

## License

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

---

.
codeserializerlib 1.0.6
Python library for the code serializer

# spaCy powered Label Studio ML backend

spaCy integration for Label Studio.
this is running besides the azure functions.

[Demo video](https://youtu.be/F19NT-21uT4)

## running the backend

1. prepare environment

```bash
python -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt
pip install --upgrade pip
```

Compile your library
```bash
python setup.py sdist bdist_wheel
```

Upload to Pypi
```bash
twine upload dist/* 
```

running tests
```bash
pytest tests/ -W ignore::DeprecationWarning
```

2. start label studio
```bash
label-studio
```

3. Start the backend and add the URL to your Label Studio project settings.

```bash
label-studio-ml start channel_ml_ner
```

4. As you train new models, they will appear in a `checkpoints` directory. The latest checkpoint will be symlinked to `latest-model`.



## modifying the config

In the `channel_ml_ner` directory, add your spaCy `config.cfg` file. You can optionally add a `model-best` folder from a pre-trained model, to get started with predictions straight away.
pydebugstring 1.0.0.2
function to write python obects to OutputDebugString on windows
Requires Python: >=3.0

# pydbugstring

Provides a function OutputDebugString to call:
    - on win32 platforms, calls the ctypes.windll.kernel32.OutputDebugStringW with any Python Object, after converting that object to a string.  
    - on other platforms, converts the argument to a string and discards it, returns 0

Provides a handler for the Python Logging Module which sends logging to OutputDebugString.  On platforms other than win32, the logging output is disccarded.


The output can be viewed using the [DebugView](https://learn.microsoft.com/en-us/sysinternals/downloads/debugview) program from the SysInternals  package from Microsoft.


# Sample Use

```
import  pydebugstring
import sys
import logging
#send an object to OutputDebugString
logger=logging.getLogger()
logger.setLevel(logging.DEBUG)
logger.addHandler(pydebugstring.OutputDebugStringHandler())
print(f"Sending sys.path [{sys.path}]  to outputDebugString")
pydebugstring.outputDebugString(sys.path)

debug_message = "Sample Debug Message"
print(f"Sending [{debug_message}] with logging.info")

logging.info(debug_message)

```
forbiddenfp 0.9.9.3
Forbidden Functional Programming in Python.
Requires Python: >=3.7

# forbiddenfp

## Summary

Functional-Programming (FP) in a forbidden way:

You can turn arbitrary function into postfix notation in favor of function chaining.

And the library provides many useful patches for builtin/itertools functions.

## Install

Compatible with Python 3.7+

```shell
pip install forbiddenfp
```

## Examples

```python
# objects are already patched at import time
import forbiddenfp

"abc".print().len()  # print out "abc", then return 3
"abc".then(lambda s: s * 2).filter(lambda s: s == "b").join()  # "bb"

# A more complex one (examples/word_count.py)
("./lorem_ipsum.txt"
 .with_open(lambda path, f: f.read().also(print(f"Reading {path}")))
 .then(lambda s: s.split(" "))
 .counter()
 .print())

```

See more `./examples`.

## `_unpack`

For every higher-order-function chained, we provide an `_unpack` version as well.
e.g. `[(1, 2), (3, 4)].sum(lambda x: x[0] * x[1])`
can also be called as `[(1, 2), (3, 4)].sum_unpack(lambda x, y: x * y)`

## Why Functional Programming

Separate out control structs (which are functions provided by library) from business logic (which are lambda functions
supplied to fill the control structs).

So we can have a clearer scope, and separate concerns, when we want to change on either side of things.

- `if ...` and `if ... else ...` are modeled by Maybe/Either monads.
- `while ...` and `for ... in ...` are generator/iterators. Additionally, stop-early behavior is `takewhile` of the
  sequence.

Philosophically, think more in `def transform(old_state) -> new_state`, rather than `state = modify(state)`.

## What About Auto-completion?

This library is almost an embedded Domain Specific Language (DSL) in Python.

It is understandable that users aren't familiar with what is available without auto-completion features in IDEs.

So we leverage the stub file to provide type hints for the builtin `object` type, which IntelliJ/PyCharm/VsCode all support.

![img_1.png](img_1.png)

In order to find where to stub, open your IDE and Python project/file, type `object` to get a class, CTRL/CMD + Click and use
"Find Definition" feature to get to the stub file of your IDE plugin.

Then copy/paste `src/forbiddenfp/__init__.py` under `class object` stub.

Note that for IntelliJ/Pycharm, once you CTRL + Click on `object`, you would need to click on the little icon below
to get to the *actual* stub file. Append content there.

![img.png](img.png)

## Warning

This library patches builtin `object` (and hence ALL classes),
with hacks around CPython API (provided by [forbiddenfruit](https://github.com/clarete/forbiddenfruit)),

so consider this NSFW (Not Safe For Work).

## Known Issues

`None` doesn't work well with chained keyword arguments.

```python
import forbiddenfp

None.apply(print)  # works
None.apply(func=print)  # doesn't work
```
FastSocket 1.0.5
This library is intended to create fast TCP and UDP server/client with multi connection handling.


    ![](https://github.com/giulicrenna/FastSocket/blob/main/assets/20240219_232307_logo.png)

# FastSocket

![GitHub release (latest by date)](https://img.shields.io/github/v/release/giulicrenna/FastSocket)

The FastSocket library is designed to quickly create TCP and UDP servers and clients with multi-connection handling. The library provides a simple API for setting up and managing network socket connections in Python.

## Installation

You can install FastSocket using pip:

```bash
pip install FastSocket
```

## Usage Examples

### TCP Server Example

```python
from FastSocket import FastSocketServer, SockerConfig

def handle_message(messages):
    while not messages.empty():
        msg, addr = messages.get()
        print(f'Received: {msg} from {addr}')

config = SockerConfig(host='localhost', port=8080)
server = FastSocketServer(config)
server.on_new_message(handle_message)
server.start()

```

## Contributing

If you want to contribute to FastSocket, we welcome pull requests! Before submitting a pull request, please make sure to review the contribution guidelines.

# Contact

If you have any questions, issues, or suggestions related to FastSocket, feel free to open an issue or contact the author:

*Author:* Giuliano Crenna
*Email:* giulicrenna@gmail.com

## License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for more details.
Ubii-Python-Protofiles 0.1.1
Ubii Message Protobuf files compiled for python
Requires Python: >=3.7

# Ubii message formats compiled for python

## How to use

- Import the required message type
- Instanciate an object of the type

```python
from proto.services.serviceRequest_pb2 import ServiceRequest

request = ServiceRequest()
request.topic = '/services/topic_list'
```
- For more information on the different message types and how to use them check out:
  - https://github.com/SandroWeber/ubii-msg-formats
  - https://protobuf.dev/getting-started/pythontutorial/
BSD 3-Clause License

Copyright (c) 2024, IN-FAR / Ubi-Interact, Sandro Weber (webers@in.tum.de)
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
  contributors may be used to endorse or promote products derived from
  this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.