semvec/pypi-packages huggingface dataset:
alparc 0.0.8
Artificial languages with rhythmicity, phonological, and acoustic controls
Requires Python: >=3.8

# ALPARC
This is code for our work [The ALPARC Toolbox: Artificial Languages with Phonological and Acoustic Rhythmicity Control](https://doi.org/10.1101/2024.05.24.595268)

## Setup
The following describes how you can set up the software and run the experiments from the paper.

### Install Package
The simplest is to clone this repository and install ALPARC in editable mode:
```shell
pip install -e .
```

If you want to use ALPARC as a package, you can install it directly from git with
```shell
pip install git+https://github.com/milosen/alparc.git
```

## Run the code from the paper

Clone this repository. Install jupyter
```shell
pip install jupyter
```
If you use a virtual environement, you also need to install the ipython-kernel:
```shell
python -m ipykernel install --user --name=alparc
```
In this case, don't forget to select the `alparc` kernel in the jupyter session's kernel option (Kernel -> Change kernel -> alparc).

Start jupyter
```shell
jupyter notebook
```
and select the notebook you want. 

1.  `publication/data_and_stats_from_the_paper.ipynb` reproduces the data for the figures and the appendices of the paper
2.  `publication/plots_from_the_paper.ipynb` reproduces the figures in the publication
3.  *Optional*: If you want to generate or diagnose your own data, please have a look at the tutorial on how to use the command line tool: `workshop/00_basic_command_line_usage.ipynb`. This notebook shows how to use the command line tool `alparc` to generate data and run the analysis. You can also use the command line tool directly from the terminal. The tool can be run with `alparc --help`
4.  *Optional*: If you want to adapt ALPARC to your own research needs, you'll probably want to take a closer look at the library, or even the internals of the toolbox. More notebooks on that can be found in [ALPARC's Workshop Directory](https://github.com/milosen/alparc_workshop)

# Citation
Please cite our work as
```
@article {Titone2024ALPARC,
	author = {Titone, Lorenzo and Milosevic, Nikola and Meyer, Lars},
	title = {The ALPARC Toolbox: Artificial Languages with Phonological and Acoustic Rhythmicity Control},
	elocation-id = {2024.05.24.595268},
	year = {2024},
	doi = {10.1101/2024.05.24.595268},
	publisher = {Cold Spring Harbor Laboratory},
	URL = {https://www.biorxiv.org/content/early/2024/05/24/2024.05.24.595268},
	eprint = {https://www.biorxiv.org/content/early/2024/05/24/2024.05.24.595268.full.pdf},
	journal = {bioRxiv}
}
```
OptimalAgents-power 0.2.0
A project generator for agents using FastAPI, Flask, or REST.
Requires Python: >=3.11

# Optimal Agents Project Generator

A powerful CLI utility designed to streamline the development of AI agent-powered applications by generating comprehensive starter templates. This tool is specifically crafted for developers working with intelligent agents, language models, and AI-driven applications, supporting multiple Python web frameworks including **FastAPI**, **Flask**, and **REST-based Python servers**.



## ðŸ”§ Installation

```bash
# Create a new directory
mkdir my_agent_project
cd my_agent_project

# Create virtual environment
python -m venv venv

# Activate virtual environment
# On Windows
venv\Scripts\activate
# On Unix or MacOS
source venv/bin/activate

# Install the package
pip install OptimalAgents-power

# Create your agent project
create-agent <project-name>
# Follow the prompts:
# - Enter your name
# - Enter your email
# - Enter project description
# - Select framework (flask/fastapi/restapi)
```

The generator creates a production-ready environment where you can:
- Deploy multiple AI agents with different capabilities
- Handle complex conversation flows
- Manage agent memory and context
- Scale your AI operations efficiently
- Monitor agent performance and usage
- Implement security best practices for AI endpoints
keyv 0.4.0
A lightweight, file-based NoSQL key-value database using sqlite3, designed for simple and practical uses without external dependencies.
Requires Python: >=3.8

# keyv

Transform SQLite into a powerful and fast key-value store.

`keyv` is a lightweight library that turns SQLite into a NoSQL key-value database, combining the best of both worlds: the simplicity of key-value stores with the reliability of SQLite. Perfect for applications that need a robust local database without the complexity of a full DBMS.

# Usage

```bash
pip install keyv
```

```python
import keyv

# initialize the database
db = keyv.connect('keyv.db') # or .anything, since is sqlite3 engine, you can choose any

# create or get a collection
collection = db.collection('my_collection')

# insert a key-value pair
collection.set('key1', 'value1')

# by default the .set method will replace existing values
# if you want to prevent overwriting existing keys, you can
# use replace_if_exists=False
collection.set('key1', 'value1', replace_if_exists=False)

# retrieve a value by key
collection.get('key1')
# >>> 'value1'
# note: the get method returns None for non-existing keys

# update a value
collection.update('key1', 123)
collection.get('key1')
# >>> 123

# delete a key-value pair
collection.delete('key1')

# search for keys by value
collection.set('key2', 'common_value')
collection.set('key3', 'common_value')
collection.search('common_value')
# >>> ['key2', 'key3']

# retrieve all keys, values and items
collection.keys()
# >>> ['key2', 'key3']

# retrieve all values
collection.values()
# >>> ['common_value', 'common_value']

# retrieve all key-value pairs
collection.items()
# >>> [('key2', 'common_value'), ('key3', 'common_value')]

# check if a key exists
collection.key_exists('key2')
# >>> True

# rename a collection
collection.change_name('new_collection_name')

# delete a collection
db.delete_collection('new_collection_name')

# get list of all collections
db.collections()
# >>> ['collection1', 'collection2', ...]

# iterate over key-value pairs
for key, value in collection.iteritems():
    print(f"{key}: {value}")

# iterate over keys
for key in collection.iterkeys():
    print(key)

# iterate over values
for value in collection.itervalues():
    print(value)

# get with default value for missing keys
collection.get('missing_key', default='default_value')
# >>> 'default_value'

# raise exception for missing keys
try:
    collection.get('missing_key', raise_if_missing=True)
except ValueError:
    print("Key not found!")
```

Collections allow you to organize your data into separate namespaces within the same database file.
In practice, they are tables inside the SQLite file.

# Quick Start

For simple use cases, you can create a default collection right away:

```python
# Create a database with a default collection
db = keyv.connect('keyv.db').collection('main')

# Now you can use the collection methods directly
db.set('key1', 'value1')
db.get('key1')
# >>> 'value1'
```

# License

This project is licensed under the MIT License. See the LICENSE file for details.

# Contributing

Contributions are welcome! Please feel free to submit a PR.
librerias-ag 0.2
Una libreria para Algoritmos Geneticos
Requires Python: >=3.8

librerias-ag

librerias-ag es una librería de Python diseñada para experimentar con algoritmos genéticos básicos y funciones de optimización. Incluye herramientas para generar poblaciones, aplicar mutaciones simples y minimizar funciones objetivo, con soporte opcional para visualización del progreso en cada generación.

Características

- Definición de funciones objetivo personalizadas (ej. \( f(x) = x^2 \)).
- Generación aleatoria de individuos y poblaciones.
- Simulación simple de evolución por selección y mutación.
- Visualización de la minimización de la función en gráficas.
- Ideal para aprender conceptos básicos de optimización evolutiva.
asgi-prometheus-exporter 0.1.0
ASGI middleware for Prometheus metrics collection
Requires Python: >=3.10

# ASGI Prometheus Exporter

A middleware for ASGI applications that exports Prometheus metrics. This middleware is compatible with any ASGI framework (Django, FastAPI, Starlette, etc.) and ASGI Servers.


- Django (with Django ASGI)
- FastAPI 
- Starlette
- Quart
- Sanic
- Any other ASGI-compatible framework

Tested with FastAPI 

## Features

- Request duration metrics
- Request count metrics
- Response status code metrics
- Custom metrics support (TODO)
- Compatible with any ASGI framework (UNDER EVALUATION)
- Easy to integrate

## Installation

```bash
pip install asgi-prometheus-exporter
```

## Usage

### Basic Usage with FastAPI

```python
from fastapi import FastAPI
from asgi_prometheus_exporter import PrometheusMiddleware

app = FastAPI()
app.add_middleware(PrometheusMiddleware)

@app.get("/")
async def root():
    return {"message": "Hello World"}
```

### Usage with Django

In your Django project's `asgi.py`:

```python
import os
from django.core.asgi import get_asgi_application
from asgi_prometheus_exporter import PrometheusMiddleware

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myproject.settings')

# Get the Django ASGI application
django_asgi_app = get_asgi_application()

# Wrap it with the Prometheus middleware
application = PrometheusMiddleware(
    django_asgi_app,
    metrics_path="/metrics",  # Optional: customize metrics endpoint
    custom_labels={
        "app": "django_app",
        "environment": "production"
    }
)
```

Then in your `settings.py`:
```python
ASGI_APPLICATION = 'myproject.asgi.application'
```

### Usage with Starlette

```python
from starlette.applications import Starlette
from starlette.responses import JSONResponse
from asgi_prometheus_exporter import PrometheusMiddleware

app = Starlette()
app.add_middleware(PrometheusMiddleware)

@app.route("/")
async def homepage(request):
    return JSONResponse({"message": "Hello World"})
```

### Custom Metrics Endpoint

By default, metrics are exposed at `/metrics`. You can customize this by passing the `metrics_path` parameter:

```python
app.add_middleware(
    PrometheusMiddleware,
    metrics_path="/custom/metrics/path"
)
```

### Custom Labels

You can add custom labels to your metrics:

```python
app.add_middleware(
    PrometheusMiddleware,
    custom_labels={
        "app": "myapp",
        "environment": "production"
    }
)
```

## Available Metrics

The middleware exposes the following metrics:

- `asgi_http_requests_total`: Total number of HTTP requests
- `asgi_http_request_duration_seconds`: HTTP request duration in seconds
- `asgi_http_requests_in_progress`: Number of HTTP requests in progress
- `asgi_http_responses_total`: Total number of HTTP responses by status code

## Running with Different ASGI Servers

### Uvicorn
```bash
uvicorn myproject.asgi:application
```

### Daphne (Django)
```bash
daphne myproject.asgi:application
```

### Hypercorn
```bash
hypercorn myproject.asgi:application
```

## License

MIT License
pyholfuy 0.2
A Python library for interacting with Holfuy weather stations.
Requires Python: >=3.11
Keywords: weather, holfuy, api, python

![Holfy Logo](https://holfuy.com/image/logo/holfuy-logo.png)

# PyHolfuy
A Python library for talking to [Holfuy Weather Stations](https://holfuy.com/).

You need an API key to access the service. To obtain one, please visit the [Holfuy API](https://api.holfuy.com/live/) pages.

The Library only access live data.

## Example Code
Here is an example of how to use the library.

```python
import aiohttp
import asyncio
from holfuy import HolfuyService

async def main():
    async with aiohttp.ClientSession() as session:
    s = HolfuyService("", session)
    data = await s.fetch_data(["101"])
    print(data)

if __name__ == "__main__":
    asyncio.run(main())
```
langchain-ragie 0.3.2
Ragie integration for LangChain
Requires Python: <4.0,>=3.9.2

# langchain-ragie

Ragie (https://ragie.ai) integration for LangChain

## Install

```bash
pip install langchain-ragie
```

## Usage

If you need asyncio, see [this example.](https://github.com/ragieai/langchain-ragie/blob/main/examples/async.py).

```python
from langchain_openai import ChatOpenAI
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.output_parsers import StrOutputParser
from langchain_core.runnables import RunnablePassthrough

import langchain_ragie

template = """Answer the question based only on the following context:

{context}

Question: {question}
"""
prompt = ChatPromptTemplate.from_template(template)
model = ChatOpenAI()
retriever = langchain_ragie.RagieRetriever()


def format_docs(docs):
    return "\n\n".join([d.page_content for d in docs])


chain = (
    {"context": retriever | format_docs, "question": RunnablePassthrough()}
    | prompt
    | model
    | StrOutputParser()
)

response = chain.invoke("What do the besties think about Davos?")

print(response)

```

## License

Distributed under the MIT License. See `LICENSE.txt` for more information.