semvec/pypi-packages huggingface dataset:
horos-io 0.1.2.20
small package to deal with data exported from Horos
License: MIT
Requires Python: >=3.8,<3.12

========
horos_io
========


.. image:: https://img.shields.io/pypi/v/horos_io.svg
        :target: https://pypi.python.org/pypi/horos_io

.. image:: https://img.shields.io/travis/santomon/horos_io.svg
        :target: https://travis-ci.com/santomon/horos_io

.. image:: https://readthedocs.org/projects/horos-io/badge/?version=latest
        :target: https://horos-io.readthedocs.io/en/latest/?badge=latest
        :alt: Documentation Status




handling .xml files when exported from horos; some dataset functionality


* Free software: MIT
* Documentation: https://horos-io.readthedocs.io.


Features
--------

* TODO

Credits
-------

This package was created with Cookiecutter_ and the `briggySmalls/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`briggySmalls/cookiecutter-pypackage`: https://github.com/briggySmalls/cookiecutter-pypackage
hf-endpoints-emulator 0.1.1
Emulator for Custom Handlers for Inference Endpoints
License: MIT
Requires Python: >=3.8.0
Keywords: NLP deep-learning transformer pytorch tensorflow BERT GPT GPT-2

# Emulator for Custom Handlers for Inference Endpoints

🤗 Inference Endpoints offers a secure production solution to easily deploy any 🤗 Transformers and Sentence-Transformers models from the Hub on dedicated and autoscaling infrastructure managed by Hugging Face.

🤗 Inference Endpoints support all of the 🤗 Transformers and Sentence-Transformers tasks as well as custom tasks not supported by 🤗 Transformers yet like speaker diarization and diffusion.

The `hf-endpoints-emulator` package provides a simple way to test your custom handlers locally before deploying them to Inference Endpoints. It is also useful for debugging your custom handlers. 

The package provides a `hf-endpoints-emulator` command line tool that can be used to run your custom handlers locally. It also provides a `hf_endpoint_emulator` Python package that can be used to run your custom handlers locally from Python.

## Installation

```bash
pip install hf-endpoints-emulator
```

## Usage

You can check the `examples/` directory for examples on how to use the `hf-endpoints-emulator` package.

### Command Line

```bash
hf-endpoints-emulator --handler <handler> 
```

This will start a web server that will run your custom handler. The web server will be accessible at `http://localhost:5000`. You can then send requests to the web server to test your custom handler.

**curl**

```bash
curl --request POST \
  --url http://localhost/:5000 \
  --header 'Content-Type: application/json' \
  --data '{
        "inputs": "I like you."
}'
```

**python**

```python
import requests

url = "http://localhost:5000/"

payload = {"inputs": "test"}
headers = {"Content-Type": "application/json"}

response = requests.request("POST", url, json=payload, headers=headers)

print(response.json())
```

## Python pacakge

```python
from hf_endpoints_emulator.emulator import emulate

emulate(handler_path="examples/my_handler.py", port=5000)
```
telegram-error-alerter 1.0.1
Send error to telegram group via bot
License: MIT
Keywords: sms,python,api,sending,sending message,sending message,sending message api,sending error message api python,sending error api telegram

==============================================================
Handle errors and send it Telegram group!
==============================================================

import Alerter

tg_alert = Alerter(bot_token='YOUR_BOT_TOKEN', chat_id='YOUR_CHAT_ID')
#or
tg_alert = Alerter.from_environment() #Recommend

method_1: tg_alert.send_message(chat_id=111222333, text='Message text')
#or
method_2: as decorator
@tg_alert
def some_func_that_can_raise_an_exception():
raise RuntimeError('this is an exception')

We could use in except scope as:
        except Exception as e:
            return tg_alert.custom_alert(text=e)
dtelegram-error-alerter 1.0.1
Send error to telegram group via bot
License: MIT
Keywords: sms,python,api,sending,sending message,sending message,sending message api,sending error message api python,sending error api telegram

==============================================================
Handle errors and send it Telegram group!
==============================================================

import Alerter

tg_alert = Alerter(bot_token='YOUR_BOT_TOKEN', chat_id='YOUR_CHAT_ID')
#or
tg_alert = Alerter.from_environment() #Recommend

method_1: tg_alert.send_message(chat_id=111222333, text='Message text')
#or
method_2: as decorator
@tg_alert
def some_func_that_can_raise_an_exception():
raise RuntimeError('this is an exception')

We could use in except scope as:
        except Exception as e:
            return tg_alert.custom_alert(text=e)
beeline-performance 0.0.8
Code for measure performance and analize logs with streamlit dashborad
License: MIT
Requires Python: >=3.8

# Beeline Performance

This project contains the code that measure function performance and builds streamlit web app for performance analysis.

- [Getting Started](#getting-started)
- [Information about the parameters](#information-about-the-parameters)
- [How to use decorators](#how-to-use-decorators)
- [Run streamlit](#run-streamlit)

## Getting Started
1. Install all dependencies:
    ```
    pip install -r requirements.txt
    ```

2. If you have a lot of function for decorate, create .env file in root directory of the project like .env_default and fill it. This is necessary to use the same parameters for all functions:
    ```bash
    LOG_PATH =
    TIME_ZONE = 
    SPEED_BIND =
    PEROFRMANCE_BIND = 
    DEBUG_PERFORMANCE =
    ```


## Information about the parameters

`section`: name of the function / code section.  
`log_bind`: name for bind loguru logger.  
`log_path`: path to save logger files.  
`csv_name`: name for csv file with logs.  
`th`: threshold for speed. If new measured speed is greater than (old speed + threshold %) or less than (old speed - threshold %) it is anomaly. Value must be between 0 and 1. (e.g., 0.1 = 10%).  
`number_of_function_calls`: When enough function calls are collected the update function starts working. **Note**: to log metric, you need at least two calls of the function.    
`time_zone`: time zone.  
`enable`: argument to enable performance measuring.  
- Only for time performance:  
`return_speed`: flag for return time for fps. 

- Only for cpu/ram performance:   
`update_time`: timeout parameter. Note: psutil can load metrics permanently and this calculation can overloads measure list that is why we set timeout. Defaults to 1.  
`pid` (psutil.Process): pid id for process.  
`unit`: data measurement one of ["kb", "mb", "gb"]


## How to use decorators:
1. Time decorator:
    ```
    from beeline_performance import TimePerformance

    @TimePerformance(log_bind="test_bind", log_path="logs", csv_name="testing", th=0.0001, 
    number_of_function_calls=1, section="test_func", time_zone="Asia/Almaty", enable=True)
    def test():
        result = 0
        for i in range(1_000_000):
            result += i ** 3
            result -= i ** 2
        print(result)
        
    for _ in range(10):
        test()
    ```

2. CPU/RAM decorator:
    ```
    from beeline_performance import CPUPerformance, RAMPerformance

    cpu_performance = threading.Thread(target=CPUPerformance())
    cpu_performance.daemon = True

    ram_performance = threading.Thread(target=RAMPerformance(unit="mb"))
    ram_performance.daemon = True

    cpu_performance.start()
    ram_performance.start()
    ```

## Run streamlit:
1. Open streamlit by address:
    ```
    https://beeline-performance.streamlit.app/
    ```

2. If you need run local streamlit. Copy performance_web_app.py and run command:
    ```commandline
    streamlit run performance_web_app.py --server.fileWatcherType=None
    ```