semvec/pypi-packages huggingface dataset:
ctypespec 0.1.10
Define, manage, and convert C types in Python via ctypes, from AST or C declarations.
Requires Python: >=3.10

# ctypespec

**ctypespec** is a Python utility that parses C language type definitions and automatically generates equivalent `ctypes` structures. It is useful when integrating C libraries into Python projects through the `ctypes` module.

## Features

-   Parses C type definitions, including structs and typedefs.
-   Converts C declarations to Python `ctypes` classes.
-   Utilizes AST parsing and Clang tooling for accurate analysis.

## Installation

Install from source using pip:

```bash
pip install ctypespec
```
xl-base 1.0.0
xilong base utility library
Requires Python: >=3.7

# xl-base

Base utility library for xilong projects.

## Installation

```bash
pip install xl-base
```

## Usage

```python
from xl_base import random
from xl_base import time
from xl_base import array
from xl_base import json
from xl_base import number
from xl_base import number_time

# Generate random numbers
random_number = random.number(6)
random_string = random.string(10)

# Time utilities
today = time.get_today()
now = time.get_now()

# Array utilities
unique_items = array.unique([1, 2, 2, 3])

# JSON utilities
camel_dict = json.to_camel({'first_name': 'John'})

# Number utilities
chinese_number = number.to_chinese(1234.56)
```

## Modules

- `array`: Array/list manipulation utilities
- `json`: JSON/dict manipulation utilities
- `number`: Number conversion utilities
- `number_time`: Number to time format utilities
- `random`: Random string/number generation
- `time`: Time/date manipulation utilities

## License

MIT
fastapi-setup 0.2.0
Command-driven FastAPI
Requires Python: >=3.8

### 프로젝트 세팅 후 수정사항

1. 프로젝트 세팅
```python
fastapi-setup
```

2. migrations/env.py 코드 수정
```python
# config 대체
config.set_main_option("sqlalchemy.url", settings.DATABASE_URL)

# target_metadata 대체
target_metadata = BaseModel.metadata
```
polars-hist-db 0.8.25
(dsv,jetstream) --> dataframe <--> bitemporal-tables
Requires Python: <4.0,>=3.12

# polars-hist-db

This library is for scraping data from CSV style files, temporally, into MariaDB.

Main features are:
- Uploading data from strongly-typed Polars DataFrames.
- Querying data into Polars DataFrames, with column types inferred from the database schema.
- A scrape specification that:
    - Defines pipelines for typing, enriching, and normalizing data before uploading.
    - Allows construction of the 'as-of' time from file attributes or as a function of the input columns.
    - Catalogs the history of scrape inputs to prevent duplication.
    - Supports per-file transactional scraping (either the processing for a file succeeds, or the transaction is rolled back).

## Development Setup

1. Install NATS server
```bash
brew install nats-server
```

1. Create a virtual environment:
```bash
python3 -m venv .venv
source .venv/bin/activate
```

2. Install development dependencies:
```bash
poetry install --with dev
```

3. Run tests:
```bash
poetry run pytest
```

4. Make docs. The documentation will be generated in the ``docs/_build/html`` directory:
```bash
cd docs && poetry run make html
```

## Code Style

This project follows the following code style guidelines:

* Use type hints for all function parameters and return values
* Follow PEP 8 style guide
* Use Google-style docstrings
* Keep functions focused and single-purpose
* Write comprehensive tests for new features

Run ``make check`` to check the code style.


## Contributing

1. Fork the repository
2. Create a feature branch
3. Commit your changes
4. Push to the branch
5. Create a Pull Request

## License

This project is licensed under the terms specified in the LICENSE file.

## References

- [Polars Documentation](https://docs.pola.rs/api/python/stable/reference/index.html)
- [SQLAlchemy Core Documentation](https://docs.sqlalchemy.org/en/20/core/index.html)
- [MariaDB Bitemporal Tables](https://mariadb.com/kb/en/bitemporal-tables)
vector-db-at-home 2.1.0
vector db at home
Requires Python: >=3.12

Mom, can we have `milvus-lite`?

No, we have an embedded vector database at home.


# Quickstart
```python
from pprint import pprint

import numpy as np

from vector_db_at_home import VectorStore

docs = [
    {"name": "Alice", "ice_cream_flavor": "Apricot"},
    {"name": "Bob", "ice_cream_flavor": "Banana Nut"},
    {"name": "Christy", "ice_cream_flavor": "Chocolate Chip Cookie Dough"},
    {"name": "Devin", "ice_cream_flavor": "Dulce de Leche"},
]

# usually you would use vectors from an embedding model
# or have some other way to create meaningful vectors
vector_dim = 10
vecs = np.random.rand(len(docs), vector_dim)

vs = VectorStore(db_path="my_vector_store.sqlite3", dim=vector_dim)

vs.insert(vecs, docs)

search_query = np.ones((1, vector_dim))

results = vs.search(search_query, k=len(docs))

pprint(results)
```

```
[[{'distance': np.float32(1.6019362),
   'doc': {'ice_cream_flavor': 'Dulce de Leche', 'name': 'Devin'},
   'id': 3,
   'vec': array([0.49663496, 0.38377824, 0.6321332 , 0.45838   , 0.14038095,
       0.5488281 , 0.8200291 , 0.6347742 , 0.82873976, 0.39435542],
      dtype=float32)},
  {'distance': np.float32(1.6356196),
   'doc': {'ice_cream_flavor': 'Apricot', 'name': 'Alice'},
   'id': 0,
   'vec': array([0.3221011 , 0.70819205, 0.7256356 , 0.93855625, 0.59427375,
       0.79462117, 0.74481624, 0.6318444 , 0.17722918, 0.01658864],
      dtype=float32)},
  {'distance': np.float32(1.754901),
   'doc': {'ice_cream_flavor': 'Chocolate Chip Cookie Dough',
           'name': 'Christy'},
   'id': 2,
   'vec': array([0.4852044 , 0.86260295, 0.20924412, 0.6022649 , 0.10757214,
       0.5913356 , 0.04581964, 0.77801263, 0.77060676, 0.8089424 ],
      dtype=float32)},
  {'distance': np.float32(1.7927729),
   'doc': {'ice_cream_flavor': 'Banana Nut', 'name': 'Bob'},
   'id': 1,
   'vec': array([0.02818148, 0.79818   , 0.52629197, 0.65800613, 0.8545857 ,
       0.6708415 , 0.12327503, 0.9758107 , 0.9879582 , 0.00569335],
      dtype=float32)}]]
```

And you can go look at it in SQLite as well
```
% sqlite3 my_vector_store.sqlite3
sqlite> .tables
vector
sqlite> .d vector
{...snip...}
CREATE TABLE vector (
    id INTEGER PRIMARY KEY,
    vec BLOB NOT NULL,
    doc TEXT
);
{...snip...}
sqlite> .mode lines
sqlite> select id, doc, hex(vec) from vector;
      id = 0
     doc = {"name": "Alice", "ice_cream_flavor": "Apricot"}
hex(vec) = 6FEAA43E134C353F41C3393F3945703F5322183F4B6C4B3F47AC3E3F8EC0213F917B353EE7E4873C

      id = 1
     doc = {"name": "Bob", "ice_cream_flavor": "Banana Nut"}
hex(vec) = DBDCE63C86554C3F12BB063F1773283F21C65A3F45BC2B3F9E77FC3DBBCE793FD4EA7C3F498FBA3B

      id = 2
     doc = {"name": "Christy", "ice_cream_flavor": "Chocolate Chip Cookie Dough"}
hex(vec) = B66CF83E8CD35C3F1744563E082E1A3FC84EDC3DC561173F61AD3B3DD62B473F7C46453FD9164F3F

      id = 3
     doc = {"name": "Devin", "ice_cream_flavor": "Dulce de Leche"}
hex(vec) = F046FE3E957EC43E7BD3213FC9B0EA3E06C00F3E00800C3F6DED513F9080223F4A28543FF4E8C93E
```
sayancpe586fa25 5.0.0
Add your description here
Requires Python: >=3.12

This is a package with two subpackages:

1. Differential -> function diff to calculate discrete time derivative
  differentialial -> discrete -> diff (x,t) It does discrete time derivative of two vectors (list) x and t and returs a list v
2. Matrix-> 
function rowswap(matrix: torch.Tensor, i: int, j: int) -> torch.Tensor
    Swap row i and row j in a matrix.

    Args:
        matrix: Input matrix.
        i : Index of the first row.
        j : Index of the second row.

    Returns:
        torch.Tensor: matrix with row i,j swapped.


            function rowscale(matrix: torch.Tensor, i: int, s_f: float) -> torch.Tensor
     Scale row i by a factor s_f.

    Args:
        matrix: input matrix.
        i : Index of the row to scale.
        s_f (float): Scaling factor.

    Returns:
        torch.Tensor: matrix with the scaled row i by factor s_f


            function rowreplacement(matrix: torch.Tensor, i: int, j: int, sf_a: float, sf_b: float) -> torch.Tensor
    Replace the ith row with: iRi + jRj.

    Args:
        matrix (torch.Tensor): input matrix.
        i (int): Index of the row to be replaced.
        j (int): Index of the source row.
        sf_a (float): Scaling factor for row i.
        sf_b (float): Scaling factor for row j.

    Returns:
        torch.Tensor: Result Matrix


            function rref(matrix: torch.Tensor) -> torch.Tensor
    Performs Reduced Row Echelion Form or Gausian Elemination on Marix

    Args:
        matrix (torch.Tensor): input matrix
    Returns:
        torch.Tensor: Result matrix RREF of input

            function uniform(a: float = 0.0, b: float = 1.0)
        Returns uniform values between 0 and 1
        E.G Use uniform(0,1)

            function exponentialdist(lmbd: float)
        Returns exponential distribution
    Args:
        Lambda value for exponential distribution 
        E.G. Use exponentialdist(lmbd)

            function poissondist(lmbd: float):
        Returns poisson distribution
    Args:
        Lambda value for poisson distribution
        E.G. Use poissondist(lmbd)

    Added class LinearRegression, CauchyRegression, LogisticRegression
    Added class TorchNet