semvec/pypi-packages huggingface dataset:
quma 0.2.1
A SQL/database library
Requires Python: >=3.8
Keywords: sql, database

====
quma
====

|build| |docs|

quma is a small SQL database library for **Python** and **PyPy** version 3.10 and higher.
It maps object methods to SQL script files and supports **SQLite**, **PostgreSQL**,
**MySQL** and **MariaDB**.

It also provides a simple connection pool and templating for dynamic SQL like
conditional WHEREs.

Motivation
----------

Unlike ORMs, it allows to write SQL as it was intended and to use all features
the DBMS provides. As it uses plain SQL files you can fully utilize your database
editor or IDE to author your queries.

If you know how to best design your DDL and already have a SELECT in your mind
when data needs to be retrieved, welcome, this is for you.

It gives you back your powers you so carelessly gave away to ORMs.

Installation
------------

::

    pip install quma

Quick Start
-----------

The full documentation is available at https://quma.readthedocs.io

Given a directory with some SQL scripts e. g.:

::

    /path/to/sql/scripts
    ├── users
    │    ├── all.sql
    │    └── remove.sql
    └── get_admin.sql

You can access these scripts after connecting to the database:

.. code-block:: python

    from quma import Database

    db = Database('sqlite:///:memory:', '/path/to/sql/scripts')

    db.execute('CREATE TABLE users ...')

    with db.cursor as cur:
        all_users = cur.users.all()

        for user in all_users:
            print(user['name'])

        cur.users.remove(id=user['id']).run()
        cur.commit()

        admin = cur.get_admin().one()

Deploy to PyPi
--------------

Install ``uv`` if not already done. Bump version number in
``setup.py``, then:

::

    git tag -a X.X.X -m "quma version X.X.X"
    git push origin X.X.X
    uv build

	# publish manually
    uv publish --username <user> --token <token>

	# publish with credentials in .pypirc
	uvx uv-publish

License
-------

quma is released under the MIT license.

Copyright © 2018-2024 ebene fünf GmbH. All rights reserved.

.. |build| image:: https://badge.fury.io/py/quma.svg
    :target: https://badge.fury.io/py/quma
    :alt: PyPi package version

.. |docs| image:: https://readthedocs.org/projects/quma/badge/?version=latest
    :target: https://quma.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status
snaplot 0.2.2
Record and replay every step of your plotting process
Requires Python: >=3.9
Keywords: matplotlib, record, gif, evolution, plotnine, seaborn

# `snaplot`: Record and replay every step of your plotting process

<img src="https://github.com/JosephBARBIERDARNAL/static/blob/main/python-libs/snaplot/image.png?raw=true" alt="snaplot logo" align="right" width="150px"/>

`snaplot` is a **Python package** here to help your **record your plotting process**, without having to think about it!

It's highly inspired by [{camcorder}](https://github.com/thebioengineer/camcorder), an R package that does pretty much the same thing. If you're an R user, check it out!

![](docs/example.gif)

<br><br>

## Why?

By nature, data visualization is an **iterative process**: no one creates the final, perfectly polished version of a graph on the first try. It always takes plenty of **trial and error**.

Interestingly, visualizing this process can be quite insightful. That's where `snaplot` comes in.

<br><br>

## How to use?

`snaplot` provides a single class (`Camera`) and is designed to be as easy-to-use as possible.

```python
import matplotlib.pyplot as plt
from snaplot import Camera

camera = Camera.start("my_movie")

fig, ax = plt.subplots()
ax.plot([1, 2, 3], [1, 2, 3])                       # first chart
camera.snap()

fig, ax = plt.subplots()
ax.plot([1, 2, 3], [4, 2, 3], color="red")          # second chart
camera.snap()

fig, ax = plt.subplots()
ax.plot([1, 2, 3], [1, 5, 3], color="green", lw=3)  # third chart
camera.snap()

fig, ax = plt.subplots()
ax.plot([5, 2, 4], [2, 3, 3], color="blue", lw=6)   # fourth chart
camera.snap()

# GIF with 4 images, 300ms/image
camera.stop("my_file.gif", frame_duration=300)
```

![](docs/my_file.gif)

In short:

- you initiate a camera with `camera = Camera.start()`
- you take snapshots with `camera.snap()`
- you save your video with `camera.stop()`

For more info, check out the [reference page](https://y-sunflower.github.io/snaplot/camera/)

<br><br>

## Installation

```bash
pip install snaplot
```

<br><br>

## Some cool things

- You can run `Camera.start()` multiple times with the same id without forgetting previous `camera.snap()`. Unless you set `force_new=True`, it will automatically recognize that you're still recording.
- Even after calling `camera.stop("file.gif")`, you can keep recording. If you want to save the intermediate GIF, just use a different filename like `camera.stop("file2.gif")`.
- It works with any matplotlib-based plotting library: seaborn, plotnine, etc
contextF 0.0.6
Efficient context builder
Requires Python: >=3.8
Keywords: context, documents, search, nlp, ai, text-processing

# contextF

Efficient context builder. Build relevant context from documents using configurable search patterns and token-aware windowing.

## Installation

```bash
pip install contextF
```

For PDF parsing:
```bash
pip install contextF[pdf]
```

## Parameters

### Search Parameters
- `docs_path`: Directory containing documents (default: "./docs")
- `file_patterns`: File types to search (default: ["*.md", "*.txt"])
- `max_patterns_per_query`: Max search patterns to use (default: 3)
- `max_matches_per_file`: Max matches per file (default: 3)
- `case_sensitive`: Case sensitive search (default: false)

### Token Parameters
- `max_context_tokens`: Maximum total context tokens (default: 500000)
- `context_window_tokens`: Context window size around matches (default: 10000)
- `max_file_tokens`: Max tokens per file before windowing (default: 200000)
- `encoding`: Tokenizer encoding (default: "cl100k_base")

### LLM Parameters (Optional)
- `enabled`: Enable LLM pattern generation (default: true)
- `model`: OpenAI model (default: "gpt-4.1-mini")
- `temperature`: LLM temperature (default: 0.3)

## Documentation
For detailed documentation and code examples, please refer to the [README.md](https://github.com/adc77/contextF/blob/main/README.md) file.