semvec/pypi-packages huggingface dataset:
pyspotriver 0.0.3
pyspotriver - Python Sequential Parameter Optimization Interface to River
Requires Python: >=3.10

# pyspotriver

# Development


## Styleguide 

Follow the Google Python Style Guide from [https://google.github.io/styleguide/pyguide.html]([https://google.github.io/styleguide/pyguide.html).

## Pre commit checks

Before you commit your code, please check that it is "clean". 
To do so, first run [`black`](https://github.com/psf/black) from the projects root directory:

```
$ black .
```

Next, check if [`flake8`](https://flake8.pycqa.org/en/latest/) shows any errors:

```
$ flake8
```

Fix any shown errors before you commit.

# Installation

## github

* Clone the github repository.



## Python

* Mac Users: Install [brew](https://brew.sh/index_de)
  * `brew install python` and `brew install graphviz` etc.

* Generate and activate a virtual environment, see [venv](https://docs.python.org/3/library/venv.html), e.g.,
  * `cd ~; python3 -m venv .venv`
  * `source ~/.venv/bin/activate`

### Python mkdocs

* `python -m pip install mkdocs mkdocs-gen-files mkdocs-literate-nav mkdocs-section-index mkdocs-material`
* `mkdocs build`
* `mkdocs serve`
* `http://127.0.0.1:8000/`


### Optimizing/Profiling Code

* [scipy lecture notes: optimizing code](https://scipy-lectures.org/advanced/optimizing/index.html)

https://scipy-lectures.org/advanced/optimizing/index.html

## Editor/IDE

* Optional: Install [visualstudio](https://code.visualstudio.com)
* Optional: Install [quarto](https://quarto.org)


## Package Installation

### Configuration Files

* This information is based on [https://packaging.python.org/en/latest/tutorials/packaging-projects/](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
* Information is stored in `pyproject.toml` (`setup.py` is not used anymore.)
* A `src` folder is used for the package sources.
* The following files are used for the package building:
   * `pyproject.toml`: see [pyproject.toml](./pyproject.toml). 
   * Important: Follow the instructions from [https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html](https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html) for including data files (like *.csv, *.tar, etc.). These files can be specified in the following `MANIFEST` file:
     * `MANIFEST`: see [MANIFEST](MANIFEST.in). It describes the data files to be included, e.g.:
       * `include src/pyspotriver/data/*.rst`
    * `LICENSE`: see [LICENSE](./LICENSE)

### Installation

* Perform the following steps to install the package:
  * Make sure you have the latest version of PyPA’s build installed:
    * `python3 -m pip install --upgrade build`
  * Start the package building process via:  `python3 -m build` 
  * This command should output a lot of text and once completed should generate two files in the `dist` directory.
  * You can use the local `pyspotriver*.tar.gz` file from the `dist` folder for your package installation with `pip`, e.g.;
  * `python3 -m pip install ./dist/pyspotriver-*.tar.gz`
aiotinydb 2.0.0
asyncio compatibility shim for tinydb
Requires Python: >=3.7

# aiotinydb

[![PyPI](https://img.shields.io/pypi/v/aiotinydb.svg)](https://pypi.python.org/pypi/aiotinydb) [![PyPI](https://img.shields.io/pypi/pyversions/aiotinydb.svg)](https://pypi.python.org/pypi/aiotinydb) [![PyPI](https://img.shields.io/pypi/l/aiotinydb.svg)](https://pypi.python.org/pypi/aiotinydb) ![Build Status](https://github.com/aiotinydb/aiotinydb/actions/workflows/ci.yml/badge.svg) [![Say Thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/ASMfreaK)

asyncio compatibility shim for [`TinyDB`](https://github.com/msiemens/tinydb)

Enables usage of TinyDB in asyncio-aware contexts without slow syncronous IO.


See documentation on compatible version of [`TinyDB`](https://tinydb.readthedocs.io/en/v4.7.0/).

Basically all API calls from `TinyDB` are supported in `AIOTinyDB`. With the following exceptions: you **should not** use basic `with` syntax and `close` functions. Instead, you **should** use `async with`.

```python
import asyncio
from aiotinydb import AIOTinyDB

async def test():
    async with AIOTinyDB('test.json') as db:
        db.insert(dict(counter=1))

loop = asyncio.new_event_loop()
loop.run_until_complete(test())
loop.close()
```

CPU-bound operations like `db.search()`, `db.update()` etc. are executed synchronously and may block the event loop under heavy load. Use multiprocessing if that's an issue (see [#6](https://github.com/aiotinydb/aiotinydb/issues/6#issuecomment-1125343152) and [examples/processpool.py](examples/processpool.py) for an example).

## Middleware

Any middlewares you use **should be** async-aware. See example:

```python
from tinydb.middlewares import CachingMiddleware as VanillaCachingMiddleware
from aiotinydb.middleware import AIOMiddleware

class CachingMiddleware(VanillaCachingMiddleware, AIOMiddlewareMixin):
    """
        Async-aware CachingMiddleware. For more info read
        docstring for `tinydb.middlewares.CachingMiddleware`
    """
    pass
```

If middleware requires some special handling on entry and exit, override `__aenter__` and `__aexit__`.

## Concurrent database access

Instances of `AIOTinyDB` support database access from multiple coroutines.

On **unix-like systems**, it's also possible to access one database concurrently from multiple processes when using `AIOJSONStorage` (the default) or `AIOImmutableJSONStorage`.

## Installation

```
pip install aiotinydb
```
ans-pycli 0.0.5
CLI for your python projects
Requires Python: >=3.10,<4.0

# ans-pycli

[![Tests](https://github.com/alxnsmith/ans-pycli/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/alxnsmith/ans-pycli/actions/workflows/tests.yml)

Quickly build CLI for your own python projects with lightweight module

## How to Install

- pip

  ```bash
  pip install ans-pycli
  ```

- poetry
  ```bash
  poetry add ans-pycli
  ```
pandas-scd2 1.0.3
slowly changing dimension with pandas
Requires Python: >=3.8
Keywords: scd,slowly changing dimension,pandas

# pandas_scd

  

executing slowly changing dimension type 2 on pandas dataframes

given pandas df of the source table, and pandas df of the target table, returning pandas df with the entire new target after scd2



## Installation  
basic installtion :
 
    pip install pandas-scd2 

## Getting started
 

    from pandas_scd import scd2
    import pandas as df

    tgt = pd.DataFrame.from_dict({'first_name': ["Chris"], 'last_name': ['Paul'], 'team': ["Clippers"], "start_ts": [datetime(2012, 1, 14, 3, 21, 34)], "end_ts": [None], "is_active": [True]})

    src = pd.DataFrame.from_dict({'first_name': ["Chris"], 'last_name': ['Paul'], 'team': ['Suns']})

    final_df = scd2(src, tgt)



tgt:
    
| first_name | last_name | team     | start_ts            | end_ts | is_active |
|------------|-----------|----------|---------------------|--------|-----------|
| Chris      | Paul      | Clippers | 2012-01-14 03:21:34 |        | True      |



src:

| first_name | last_name | team     |
|------------|-----------|----------|
| Chris      | Paul      | Clippers |




final_df:

| first_name | last_name | team     | start_ts            | end_ts              | is_active |
|------------|-----------|----------|---------------------|---------------------|-----------|
| Chris      | Paul      | Clippers | 2012-01-14 03:21:34 | 2018-01-01 00:00:00 | False     |
| Chris      | Paul      | Suns     | 2018-01-01 00:00:00 |                     | True      |



**src:** pandas dataframe with the source of the SCD

**tgt:** pandas dataframe with the target of the SCD (target can be empty)

**cols_to_track:** list of columns to track changes (default is all columns from the source table)

**tz:** pytz time zone to use on start_ts and end_ts, default is None (will use local time)
sperm 0.0.1
SPERM (Shape Prior Embedded Regression Models) targets providing flexible shape prior embeddings into base regression models.
Requires Python: >=3.7

# SPERM

SPERM (Shape Prior Embedded Regression Models) targets providing flexible shape prior (nonnegativity, monotonicity, convexity, quasi-convexity, etc.) embeddings into base regression models (linear models, tree-based models, gaussian process regressors, MLPs, etc.), with an API as compatible to [scikit-learn](https://scikit-learn.org/) as possible. There have been many research works on this direction, but normally providing one or a few specific shape prior embeddings into one base model. We hope to fill the gap between research and application by integrating the proposed methods into one package.

An overall look at which shape priors are supported on which base models currently:

|                              | linear models |
| ---------------------------- |:-------------:|
| nonnegative / nonpositive    |      X        |
| increasing / decreasing      |      √        |
| Lipschitz                    |      √        |
| quasi-convex / quasi-concave |      X        |
| convex / concave             |      X        |

- √: supported
- -: not yet supported
- X: not supported (it is impossible or degrading to provide such shape priors on the base model)