semvec/pypi-packages huggingface dataset:
AxiosStAPI 0.0.1
Wrapper in python per usufruire delle API di RE studenti di Axios Italia
Keywords: python, axios, axios ita, axios italia, registro, elettronico, registro elettronico, api, wrapper, axios api


# AxiosStAPI
Wrapper in python per usufruire delle API di RE studenti di Axios Italia

## Getting started

### Logging in

```python
from AxiosStAPI.AxiosStAPI import AxiosStAPI
api = AxiosStAPI()
api.login(SCUOLA, USER, PASSWORD)
```

### Retrieving informations:

#### Senza Login

```python
# Ricerca delle scuole con una stringa che può essere nome, cap, via, ecc
api.retrieveAPPCustomerInformationByString(services.RetrieveAPPCustomerInformationByString.SSEARCH, query="20090")
#[{'fsIntitolazione': 'MICROTECH', 'fsNome': 'SRL', 'fsCF': '06830500960', 'fsCap': '20090', 'fsRegione': 'LOMBARDIA', 'fsCitta': 'BUCCINASCO', 'fsProvincia': 'MI'}, ...]
```

#### Con Login
Per la lista di tutti i servizi disponibili consulta [services.py](https://github.com/Invy55/AxiosStAPI/blob/main/AxiosStAPI/utils/services.py) e controlla l'implementazione in [AxiosStAPI.py](https://github.com/Invy55/AxiosStAPI/blob/main/AxiosStAPI/AxiosStAPI.py#L115-L130)
```python
# Ottieni avvenimenti di una giornata
api.retrieveDataInformation(services.RetrieveDataInformation.TIMELINE, giorno="28/02/2024")
#[{'idAlunno': '####', 'today': [{'id': '####', 'type': 'L', 'data': '28/02/2024', 'subType': '', 'ora': '', 'oralez': '2-3', 'desc': {'title': '', 'subtitle': 'SCIENZE NATURALI', 'notes': 'interrogazioni'}}, ...], 'totali': {'assenze_da_giust': '0', 'assenze_totali': '18', 'ritardi_da_giust': '0', 'ritardi_totali': '6', 'uscite_da_giust': '0', 'uscite_totali': '9'}, 'media_a': '8,51'}]
```

## Docs
Work in progress.
Fictometer 0.2.5
Classifies text as 'Fiction' or 'Non-Fiction'.
Requires Python: >=3.11.9
Keywords: Fictometer, Fiction, Non-Fiction

# Fictometer

## Description

Fictometer is an algorithm for analysing whether the given text is ```Fiction``` or ```Non-Fiction```.
It first calculates the number of ```adverbs```, ```adjectives``` and ```pronouns``` in the text.
It then calculates Ratio of Adjective to Pronoun ```RADJPRON``` and Ratio of Adverb to Adjective ```RADVADJ```, 
from which it predicts whether text is ```Fiction``` or ```Non-Fiction```.

Blog Link: 🔗[LINK](https://bekushal.medium.com/fictometer-a-simple-and-explainable-algorithm-for-sentiment-analysis-31186d2a8c7e)


## Installation

```bash
pip install Fictometer
```


## Usage
```bash
import Fictometer

text = "your_text"

pc = Fictometer.counts(text)
// returs the count of ```adjectives```, ```adverbs``` and ```pronouns```

result = Fictometer.predict(text)
// Uses counts(), then calculates RADJPRON and RADVADJ, and returns a tuple having 'result' and 'confidence'.

Fictometer.help()
// Shows how to use the package
```


## Contact

email - atmabodha@gmail.com
voyage-agents 0.0.6
AI agent and tool calling library for small local models using llama.cpp.
Requires Python: >=3.8

# voyage-agents
AI Agents for local GPUs, by Voyage Robotics.

Originally built for a hackathon in 24 hours.

Find a 7B param multi-modal LLaVa x Mistral model in [HuggingFace](https://huggingface.co/villekuosmanen/LLaVa-1.6-Mistral-7B-llama.cpp/tree/main). You can also build models yourself using the llama.cpp library.

This is a standalone package. You need to install the [llama_cpp python bindings](https://github.com/abetlen/llama-cpp-python) as well to use voyage_agents.

## Installation

See the `llama-cpp-python` install instructions in the [README](https://github.com/abetlen/llama-cpp-python?tab=readme-ov-file#installation) as the process varies based on your machine configuration, e.g. whether to use CUDA or not.

```
pip install llama-cpp-python
pip install voyage_agents
```

## Example usage

Imports and model creation.

```python3
from llama_cpp import Llama
from llama_cpp.llama_chat_format import Llava16ChatHandler

from voyage_agents.core import LlamaManager

system_prompt = "You are an intelligent robotic assistant that is navigating autonomously in an environment, attempting to complete a given task, and assisting a user with queries."
model_path = "data/llava-v1.6-mistral-7b/llava-v1.6-mistral-7b-8B-F32.gguf"
clip_model_path="data/llava-v1.6-mistral-7b/mmproj.bin"

chat_handler = Llava16ChatHandler(clip_model_path=clip_model_path)
llama = Llama(
    model_path=model_path,
    chat_handler=chat_handler,
    n_gpu_layers=20, # Uncomment to use GPU acceleration
    n_ctx=4092, # Uncomment to increase the context window
    seed=1337, # Uncomment to set a specific seed
)
manager = LlamaManager(llama, temperature=0)
```

Calling a tool based on a prompt, and returning the result in structured form.

```python3
from voyage_agents.agents import ToolCaller
from voyage_agents.tool import SearchObjectsTool, PickObjectTool, ChangeTaskTool

tool_caller = ToolCaller(manager, [SearchObjectsTool(), PickObjectTool(), ChangeTaskTool()], system_prompt)

# easy task
print(tool_caller.call("have you found the object you are looking for yet?"))
```

Answering a question with the use of tools.

```python3
from voyage_agents.agents import QuestionAnswerer
from voyage_agents.tool import SearchObjectsTool, PickObjectTool, ChangeTaskTool

agent = QuestionAnswerer(manager, [SearchObjectsTool(), PickObjectTool(), ChangeTaskTool()], system_prompt)

# easy task
answer = agent.run("how many tables has the robot seen so far?")
print(answer)
```

See the `tools` package for examples on how you'd implement your own tools.
experimentkit 0.1.20
A toolkit for easily running research experiments
Requires Python: <4.0,>=3.9

# Experiment Kit 🧪

![Static Badge](https://img.shields.io/badge/v0.1.19-blue)

Framework for creating and maintaining projects for study and research purposes.

Creating a study project is always exciting at first, but almost immediately it can become tedious because of a whole series of arrangements that need to be made in order to experiment without worrying later.
For example, it is very easy to end up with [*spaghetti-code*](https://en.wikipedia.org/wiki/Spaghetti_code#:~:text=Spaghetti%20code%20is%20a%20pejorative,with%20insufficient%20ability%20or%20experience.) and messy directories, where you don't understand where the data are and what the results of an experiment were.

This framework aims to assist the user during this boring stages in order to let them time to focus on more valuable things.
hzon-tools 0.0.5
勇哥python工具包
Keywords: python, hzon_tools, hzon, spider, windows, mac, linux


# hzon-tools

[![Downloads](https://static.pepy.tech/badge/dumb-menu)](https://pepy.tech/project/dumb-menu)

日常工作的时候我们总是会写一些重复的工具函数

包含**后端**，**数据处理**，**爬虫**等等使用python处理的场景

我会将一些工作中常用的文档以及demo也总结金来，方便沟通的查阅

zhon-tools是一个轻量级的python工具包，适用的平台包括**Windows**, **MacOS**, and **Linux**.


## Installation

```
pip install hzon_tools
```

https://pypi.org/project/hzon-tools/

https://github.com/ouyangguoyong/hzon-tool (I want stars ⭐ uwu)


## Usage

example:

```python
from hzon_tools import get_random_file_name

file_name = get_random_file_name()

```


## Update log
- `0.0.5` 添加mongo，redis,mysql处理逻辑
- `0.0.4` 修改包的调用，变得更灵活，可以直接从主包中调用任意一个子包的方法
- `0.0.3` 完善readme
- `0.0.2` 封装feapder,小菜,和自己的mc包的项目
- `0.0.1` 创建项目

## how to upload a new version (for me)

en: https://packaging.python.org/tutorials/packaging-projects/ 

zh: https://python-packaging-zh.readthedocs.io/zh_CN/latest/minimal.html#id2

> make sure have twine installed first

1. change `setup.py`
2. testing `python setup.py develop`
3. `python3 setup.py sdist`
4. `twine upload dist/*`
fourcats-flask 0.2.1
A flask encapsulated based on personal habits for fast use.
Requires Python: >=3.8
Keywords: fourcats, flask

# `FourCats-Flask`

### Statement

 - `FourCats-Flask` is a module with personal habits based on `Flask` and `Flask-RESTX` encapsulation. The main purpose of encapsulation is to provide a more convenient initialization method for partners.

### Simple Example

#### Init Flask

- The encapsulated flask object package contains JSON serialization processing, which has overloaded the request function.

```python
from fourcats_flask import Flask

flask_app = Flask(__name__)

if __name__ == '__main__':
    flask_app.run(host="localhost", port=5051, debug=True)

```

#### Init All Plug-in

```python
from fourcats_flask import Api
from fourcats_flask import Flask, FlaskInit

flask_app = Flask(__name__)

api = Api(title="Flask Base", description="Flask Base Document", doc="/api/docs")

# create_all - Whether to create a data table through Flask-Sqlalchemy. The default is false.

FlaskInit.register_api(app=flask_app, api=api)
FlaskInit.register_hook(app=flask_app, api=api)
FlaskInit.register_config(configs=["<your_path>/setting"], app=flask_app)
FlaskInit.register_sqlalchemy(app=flask_app, create_all=True)

```

#### Use Token

```python
from fourcats_flask import Token

auth = Token(secret="secret", scheme="JWT", algorithm="H265", message="Authentication failed.")

# with permission
# Using this decorator, the method will be called to execute the corresponding permission processing after the token passes the verification.
@auth.verify_permission
def verify_permission(user):
    # do something
    _ = user
    pass


```

#### About better function

- [Flask](https://flask.palletsprojects.com/en/2.1.x/)
- [Flask-RESTX](https://flask-restx.readthedocs.io/en/latest/)

### Completion example

Please [click](./example/create_flask.py) to view the completed sample code.
coipee 0.0.2
Demo of a Caipi-like system for explanatory interactive learning.
Requires Python: <=3.13,>3.10

# Coipee
A demo implementation of the [Caipi](https://github.com/stefanoteso/caipi) explanatory interactive learning algorithm.
Coipee implements a model which one can query to retrieve uncertain instances on which it lacks confidence, alongside
an explanation of the model prediction.
The user can then correct such explanation, then feed it back to Coipee to trigger an additional training guided by
the explanation.

This implementation leverages feature masks as explanation, i.e., masks which can enable or disable input features. 


## Quickstart
Install through `pip` and `venv`:
```shell
mkvirtualenv -p python3.12 coipee

pip install coipee
```

## Usage
Coipee revolves around a `Coipee object`:
```python
barman = Coipee(
    model=base_model,  # the model to explain, e.g. a neural network
    fit_model=fit_model,  # the function to train the model, invoked after a correction
    pool=data_train,   # pool of data to measure the model's uncertainty, also used for query
    pool_labels=labels_train  # labels of the pool
)
```
A typical use involves querying the model for a number of uncertain instances
```python
number_of_instances = 10
artifact = barman.query(10)
print(artifact.explanation)
```
and retrieve a feature mask: features important to the model are marked as `True`, while others as `False`.
We can also threshold importance at different levels: the higher the threshold, the higher the required importance
to mark a feature as important:
```python
artifact = barman.query(10, threshold=0.01)
print(artifact.explanation)
```

Once we have our explanation, we can correct it by marking some important features as not important, and vice versa:
```python
import copy

corrected_artifact = copy.deepcopy(artifact)

corrected_artifact.explanation[:] = False
corrected_artifact.explanation[[0, 1, 2]] = True
```
Here, we have simply said to the model that actually, only the features `0, 1, 2` are actually important.
We can also directly retrieve differences between artifacts through the `diff` method:
```python
print(f"Difference: {artifact.diff(corrected_artifact)}")
```

Now that we have corrected the explanation, we can feed it back to the model:
```python
barman.stack_correction(corrected_artifact)  # adds the correction to correction stack of the model
barman.correct_model()  # triggers a training phase
```
logsnap 1.0.0
A simple log file analyzer with summary and search functionality.
Requires Python: >=3.6

# LogSnap

LogSnap is a simple command-line tool for analyzing log files. It provides a clear, colored summary of log levels and allows users to search for specific keywords within the logs, highlighting the results for easy troubleshooting.

## Features

- **Log Summary**: Get a quick overview of log levels (DEBUG, INFO, WARNING, ERROR, CRITICAL, FATAL) with colored output.
- **Keyword Search**: Search for specific keywords in the log file and see the results highlighted in color.
- **Cross-Platform**: Works seamlessly on Windows, Mac, and Linux.

## Installation

Install LogSnap using pip:

```sh
pip install logsnap
```

## Usage

**To get a summary of the log file, run:**

```sh
logsnap path/to/logfile.log
```

**To search for a specific keyword in the log file, use:**

```sh
logsnap path/to/logfile.log --search keyword
```

Or using the short option for search:

```sh
logsnap path/to/logfile.log -s keyword
```

## License

This project is licensed under the MIT License.
streamlit-js 1.0.8
Streamlit component that allows you to run js code with both blocking and non-blocking modes.
Requires Python: >=3.7

# streamlit-js

Streamlit component that allows you to run JS code with both blocking and non-blocking modes.

The package is based on the [streamlit-javascript](https://github.com/thunderbug1/streamlit-javascript).

The main difference is that the package above doesn't allow distinguishing if the JS code is executed or not in all situations (e.g. when the code returns `null`).

It's important because Streamlit components works in asyncronous mode and cannot return value immediately. They need several reruns to get the value. So, it's important to know when the code is finished and when it's not.

This package solves this issue by returning `[]` when the code is not finished and `[None]` when the code is finished and returns `null`. Also, it allows to block the script until the JS code is executed and app is refreshed.

## Installation instructions

```sh
pip install streamlit-js
```

## Usage instructions

```python
import streamlit as st

from streamlit_js import st_js, st_js_blocking

value = st_js(code='return null;')
if not value:
    st.write('Loading...')
    st.stop()
st.write(value) # [None]
st.write(value[0] # None

# This will block the script until the js code is executed
value = st_js_blocking(code='return null;')
st.write(value) # None
```