semvec/pypi-packages huggingface dataset:
gamr-backend-api-service 1.0.9
An example Python package

# Image-Recognition-App

This app is an example of a pure MLOps probelm solving. The purpose of the app is to input an image and via a MobileNet predict the objects in it. Originally it consisted on two separate components:
* A standalone Python package with the OpenCV model.
* A server side API developed with FastAPI that consumes de model package, deployed in Vercel
* A dummy client side developed with HTML, CSS and Javascript deployed in GitHub Pages.

However, Vercel supports until 250MB of app size, and the model package, which uses OpenCV and another ML libraries, exceeded that number. Then, another solution had to be found. The model package was transformed into another API developed in Gradio and hosted in the free service Hugging Face. Then, the first API now consumes from this second API. Moreover, the image sending handling had to be changed, consisting in several transformations between lists, JSON strings and byte objects.

The resulting architecture is as follows:
1. A dummy client side developed with HTML, CSS and Javascript deployed in GitHub Pages that calls API_1.
2. An API_1 developed with FastAPI hosted in Vercel that calls API_2.
3. An API_2 that hosts the model, developed with Gradio and hosted in Hugging Face.
4. A Python package with the model, unused and replaced by API_2 because of hardware limitations.

API_1 supports automated CI/CD in GitHub Actions. Building includes installing of dependencies,  testing in Pytest, formatting with black and linter. Deployment includes both GitHub Pages and Vercel.

The model Python package supports automated CI/CD in GitHub Actions. Building inludes installing of dependencies, testing in Pytest, formatting with black and linter and package building with setuptools. Deployment includes publishing to PyPI with Twine.

#### FULL TECHNOLOGIES STACK

[API]
* FastAPI
* Uvicorn
* Gradio

[Machine Learning]
* Numpy
* matplotlib
* Pillow
* OpenCV

[Services]
* GitHub Actions
* Vercel
* Hugging Face
* PyPI

[Testing, formatting and building]
* Pytest
* Flake8
* Black
* Pre-commit
* setuptools
* Twine
bit-vault-warden-client 1.0.0
A Python client to fetch data from Bitwarden and Vaultwarden
Requires Python: >=3.8

# Python Bitwarden/Vaultwarden client

Python http client to fetch data Bitwarden or Vaultwarden.

### Current limitations

- Supports only AES encoding (type: 2)
- Supports only fetching data, totally not a CRUD API

# Installation

```
pip install bit-vault-warden-client
```

# Usage

```python
from bit_vault_warden_client import (
    WardenConfiguration, WardenAuthData,
    WardenClient, WardenCacheMode
)

# Define authentication data
auth_data = WardenAuthData(
    scope='api offline_access',
    client_id='web',
    grant_type='password',
    deviceType=9,
    deviceName='Bitwarden-Web-API'
)

# Create Warden client configuraion
config = WardenConfiguration(
    url='https://bitwarden.domain.tld',
    username='username@domain.tld',
    password='verysecure',
    auth_data=auth_data,
    cache_mode=WardenCacheMode.FALLBACK,
)

# Instantiate client and fetch data
client = WardenClient(config)
result = client.fetch_credentials('credentials item name')
```

# WardenConfiguration options

```
cache_ttl=int
```
- Cache expiration timer in seconds

---

```
cache_mode=WardenCacheMode.FALLBACK  
cache_mode=WardenCacheMode.AGGRESSIVE
```
- **WardenCacheMode.FALLBACK** for using cache only when remote is not available. In this mode client will try to use cache even if it is expired with logged warning. 
- **WardenCacheMode.AGGRESSIVE** cache will be used firsthand, and remote will be queried only if cache doesn't exist or is expired

---

```
cache_filename='bitwarden.rpx.cache',
```
- Cache filename, by default it is `bitwarden.cache` and is always placed in system temporary directory
- Must not start with `/`, `\` or `..`

---

```
http_proxy='socks5h://127.0.0.1:1082',
http_proxy='http://127.0.0.1:1082',
https_proxy='socks5h://127.0.0.1:1082',
https_proxy='https://127.0.0.1:1082',
```
- Proxy configuration, http and socks proxies are supported

---

```
https_verify=True,
```
- Certification authority verification, set `False` to be like `curl --insecure`

---

```
https_cafile='./customCA.crt',
```
- Relative or absolute path to self-signed custom CA file (in PEM format) to verify server against
- Will throw `FileNotFoundError` upon initialization if specified file has not been found
PythiaPhyloPredictor 2.0.0
Lightweight python library for predicting the difficulty of alignments in phylogenetics
Requires Python: <3.13,>=3.9

# PyPythia: Phylogenetic Difficulty Prediction Library
![Pythia GH actions CI](https://github.com/tschuelia/PyPythia/actions/workflows/test-pythia.yml/badge.svg)

## Introduction

Pythia is a lightweight python library to predict the difficulty of Multiple Sequence Alignments (MSA).
Phylogenetic analyzes under the Maximum-Likelihood (ML) model are time and resource intensive. To adequately capture the vastness of tree space, one needs to infer multiple independent trees. On some datasets, multiple tree inferences converge to similar tree topologies, on others to multiple, topologically highly distinct yet statistically indistinguishable topologies. Pythia predicts the degree of difficulty of analyzing a dataset prior to initiating ML-based tree inferences. Predicting the difficulty using Pythia is substantially faster than inferring multiple ML trees using RAxML-NG.
Pythia can be used to increase user awareness with respect to the amount of signal and uncertainty to be expected in phylogenetic analyzes, and hence inform an appropriate (post-)analysis setup. Further, it can be used to select appropriate search algorithms for easy-, intermediate-, and hard-to-analyze datasets.
Pythia supports DNA, AA, and morphological data in Phylip and FASTA format.

### Documentation
Install instructions, the CLI and the Python API are documented [here](https://tschuelia.github.io/PyPythia/).


### Support
If you encounter any trouble using Pythia, have a question, or you find a bug, please feel free to open an issue here.


### Publication
The paper explaining the details of Pythia is published in MBE:
Haag, J., Höhler, D., Bettisworth, B., & Stamatakis, A. (2022). **From Easy to Hopeless - Predicting the Difficulty of Phylogenetic Analyses.** *Molecular Biology and Evolution*, 39(12). [https://doi.org/10.1093/molbev/msac254](https://doi.org/10.1093/molbev/msac254)

> [!WARNING]
> Since this publication, we made some considerable changes to Pythia.
> The most important change is that we switched from using a Random Forest Regressor to using a LightGBM Gradient
> Boosted Tree Regressor.
> This affects all Pythia versions >= 1. If you use Pythia in your work, please state the correct learning algorithm. If
> you are unsure, feel free to reach out to me 🙂
>
> We will soon publish a pre-print that explains the changes in detail, stay tuned!


### C Library
The same functionality is also available as C library [here](https://github.com/tschuelia/difficulty_prediction).
Since the C library depends on [Coraxlib](https://codeberg.org/Exelixis-Lab/coraxlib) it is not as easy and fast to use as this python library.
If you are only interested in the difficulty of your MSA, we recommend using this Python library.
If you want to incorporate the difficulty prediction in a phylogenetic tool, we recommend using the faster C library.