semvec/pypi-packages huggingface dataset:
pg-asynq 0.2.0
Barebones async-powered message queue on python with psycopg (v3)
License: MIT
Requires Python: <4.0,>=3.11

# PG-AsynQ

PG-AsynQ is a Python library that provides an asynchronous transaction/message queue based on PostgreSQL. 
It is inspired by [pq](https://pypi.org/project/pq/), but is built for use in asynchronous contexts such as FastAPI, 
and uses psycopg 3.x for database access.

Non blocking queuing is implemented with a combination of `LISTEN/NOTIFY` and `SKIP LOCKED`. This means that this 
library is safe to use across multiple containers/processes without duplicated processing of messages.

# How to use

1. Ensure you create the tables in [migrations](./migrations) using your preferred migration tool
2. See the [examples](./examples) for how to use the library

# Features

- [x] Create and consume queues dynamically at runtime
- [x] Consume queue from any number of consumers
- [x] Retain messages until a consumer connects
- [x] In-order processing of messages
- [ ] Message retention policies (delete older than x)
rectools-lightfm 1.17.3
LightFM recommendation model
License: MIT

# LightFM

## Important

**This is a fork of the [original LightFM project](https://github.com/lyst/lightfm)**
1. Our main goal is to support emerging dependencies like newest versions of Python and to fix compatibility issues. 
2. We DO NOT guarantee support for all systems.
3. We DO NOT intend to expand or change any existing LightFM functionality.
4. We might fix essential bugs.

**About us:** we are maintainers of the [RecTools](https://github.com/MobileTeleSystems/RecTools) recommender systems framework. Our wrapper for LightFM provides 10-15 faster inference then the original model ([benchmark](https://github.com/MobileTeleSystems/RecTools/blob/main/examples/6_benchmark_lightfm_inference.ipynb)).  
In RecTools we support common RecSys models and validation tools in one easy-to-use framework.


![LightFM logo](lightfm.png)


[![PyPI](https://img.shields.io/pypi/v/rectools-lightfm.svg)](https://pypi.python.org/pypi/rectools-lightfm/)


LightFM is a Python implementation of a number of popular recommendation algorithms for both implicit and explicit feedback, including efficient implementation of BPR and WARP ranking losses. It's easy to use, fast (via multithreaded model estimation), and produces high quality results.

It also makes it possible to incorporate both item and user metadata into the traditional matrix factorization algorithms. It represents each user and item as the sum of the latent representations of their features, thus allowing recommendations to generalise to new items (via item features) and to new users (via user features).

For more details, see the [**Original** Documentation](http://lyst.github.io/lightfm/docs/home.html).

## Installation
Install from `pip`:
```
pip install rectools-lightfm
```

## Quickstart
Fitting an implicit feedback model on the MovieLens 100k dataset is very easy:
```python
from lightfm import LightFM
from lightfm.datasets import fetch_movielens
from lightfm.evaluation import precision_at_k

# Load the MovieLens 100k dataset. Only five
# star ratings are treated as positive.
data = fetch_movielens(min_rating=5.0)

# Instantiate and train the model
model = LightFM(loss='warp')
model.fit(data['train'], epochs=30, num_threads=2)

# Evaluate the trained model
test_precision = precision_at_k(model, data['test'], k=5).mean()
```

## Articles and tutorials on using LightFM
1. [Learning to Rank Sketchfab Models with LightFM](http://blog.ethanrosenthal.com/2016/11/07/implicit-mf-part-2/)
2. [Metadata Embeddings for User and Item Cold-start Recommendations](http://building-babylon.net/2016/01/26/metadata-embeddings-for-user-and-item-cold-start-recommendations/)
3. [Recommendation Systems - Learn Python for Data Science](https://www.youtube.com/watch?v=9gBC9R-msAk)
4. [Using LightFM to Recommend Projects to Consultants](https://medium.com/product-at-catalant-technologies/using-lightfm-to-recommend-projects-to-consultants-44084df7321c#.gu887ky51)
aempsconn 1.1.1
Library designed for interacting with the CIMA API (AEMPS)
License: MIT
Requires Python: <4.0,>=3.10

# AEMPSconn
Library designed for interacting with the CIMA REST API ([AEMPS](https://cima.aemps.es/cima/publico/home.html)).
More information related to the official REST API can be found [here](https://cima.aemps.es/cima/resources/docs/CIMA_REST_API.pdf).

*Note: AEMPSconn is developed to make use of it with [CIMA REST API v1.23](https://cima.aemps.es/cima/resources/docs/CIMA_REST_API.pdf).*


## Testing
**Unit-tests for this new version are under development.**


## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install aempsconn.

```bash
pip install aempsconn
```

## Usage
Each module has embedded in it the only type of filter it supports.
The filters are created dynamically so depending on the type of data you want to obtain, it will ask for the type of value required for it.

If you want to filter by more than one value, simply concatenate all the desired filters, the query-builder will create the necessary query.

```python
from aempsconn.aemps import AempsConn
from aempsconn.filter import (
    MaterialFilter,
    MedicamentoFilter,
    MedicamentosFilter,
    NotaFilter,
    PresentacionesFilter,
    RegistroCambiosFilter,
    VmppFilter,
)

aemps = AempsConn()

for med in aemps.medicamento.get(
    filter=MedicamentoFilter().nregistro.equals(value="62121")
):
    print(med.nombre)

for med in aemps.medicamentos.get(
    filter=MedicamentosFilter().nombre.startswith(value="meto")
):
    print(med.nombre)

for med in aemps.medicamentos.get(
    filter=MedicamentosFilter().nombre.startswith(value="")
):
    print(med.nombre)

for med in aemps.presentaciones.get(
    filter=PresentacionesFilter().vmp.equals("270671000140106")
):
    print(med.nombre)

for desc_cli in aemps.vmpp.get(filter=VmppFilter().nombre.contains("metotrexato")):
    print(desc_cli.vmpDesc)

for change in aemps.registro_cambios.get(
    filter=RegistroCambiosFilter().fecha.equals(value="20/12/2023")
):
    print(change)

for note in aemps.notas.get(filter=NotaFilter().nregistro.equals("69223")):
    print(note)

for material in aemps.materiales.get(
    filter=MaterialFilter().nregistro.equals("78632")
):
    print(material)

```

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.


## Disclaimer

The use of Spanish words or descriptions **is intended** to facilitate consistency between the official CIMA API and this library, so that the programmer does not hesitate with the name of each of the filters or data received.

This library is not official.