semvec/pypi-packages huggingface dataset:
socx-cli 0.12.0
System on chip verification and tooling infrastructure.
Requires Python: >=3.12

# SoCX CLI

[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json&style=flat-square)](https://github.com/astral-sh/uv)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json&style=flat-square)](https://github.com/astral-sh/ruff)
[![Hatch](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg?style=flat-square)](https://github.com/pypa/hatch)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&style=flat-square)](https://github.com/pre-commit/pre-commit)
[![PyPI - Version](https://img.shields.io/pypi/v/socx-cli?style=flat-square&color=cornflowerblue)](https://pypi.org/p/socx-cli/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/socx-cli?style=flat-square)](https://pypi.org/p/socx-cli/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/socx-cli?style=flat-square)](https://pypi.org/p/socx-cli/)

SoCX is a command-line toolbox for EDA development teams.

SoCX can also be used in your own python project/library/script and provides an
extensive API with many useful features targeted at EDA development.

For details, please refer to the [official documentation page](https://sagikimhi.dev/socx-cli/).

## Installation

> [!IMPORTANT]
> ensure you meet the following perquisites before proceeding with the
> installation of `socx`:
> -  A working installation of `pip` or [`uv`](https://github.com/astral-sh/uv).
> -  A working installation of Python 3.10 or newer version.

### Install as a tool

**with `uv`**:

```bash
uv tool install socx-cli
```

**with `pip`**:

```bash
pipx install socx-cli
```

### Run directly (without an installation)

**with `uv`**:

```bash
uvx --from socx-cli socx
```

**with `pip`**:

```bash
pipx run --spec socx-cli socx
```

### Add to your python project

**with `uv`**:

```bash
uv add socx-cli
```

**with `pip`**:

```bash
pip install socx-cli
pip freeze -r requirements.txt
```

### Upgrading to the Latest Version

**with `uv`**:

```bash
uv tool update socx-cli
```

**with `pip`**:

```bash
pipx upgrade socx-cli
```

> [!TIP]
> You can run the below command to verify `socx` was properly installed.
>
> ```console
> $ socx version
> socx-cli 0.11.1
> ```

## Documentation & Community

- Project Documentation: <https://sagikimhi.dev/socx-cli>
- Community Discussions: <https://gitter.im/socx-cli/community>

## License

Licensed under Apache-2.0.

See [LICENSE](home/license.md) for details.
mobilint-qb-runtime 1.0.0
Runtime library for Mobilint NPUs
Keywords: NPU, inference, mobilint, mblt, aries, regulus

# Mobilint SDK qb Runtime Library : qbruntime

**qbruntime** is runtime library for Mobilint NPU products. Runtime Library is required to run inference on Mobilint NPUs using precompiled or custom models.

> **IMPORTANT**: Please refer to [official documentation](https://docs.mobilint.com) for installing driver before using runtime library.

## Prerequisites

Currently, pip installation is limited to below Ubuntu environments. For other environment, please refer to [official documentation](https://docs.mobilint.com).

- Ubuntu: 20.04 / 22.04 / 24.04
- Python: 3.8 / 3.9 / 3.10 / 3.11 / 3.12
- numpy

## Installation

You may install python runtime library with following command

```bash
pip install mobilint-qb-runtime
```

For C++ library installation or downloading library from [mobilint distribution site](https://dl.mobilint.com), please refer to [official documentation](https://docs.mobilint.com).

## Inference process

Running inference on Mobilint's NPU using the `qbruntime` runtime library involves four essential steps:

1. Initialize the NPU device.
2. Load the compiled model (MXQ file).
3. Upload model to the NPU device.
4. Run inference with user input.

### Step 1: `Accelerator`

The `Accelerator` object represents the NPU device to be used. It abstracts a single device identified by the number appended to the device name (e.g., `/dev/aries0` -> `acc1`, `/dev/aries2` -> `acc2`). If no specific number is provided, NPU device `0` is used by default.

```python
acc = qbruntime.Accelerator(0)
```

### Step 2: `Model`

The `Model` object represents a model contained in an MXQ file. Upon creation, it immediately reads the MXQ file and stores the relevant information.

```python
model = qbruntime.Model(MXQ_FILE_PATH)
```

### Step 3: Pass `Model` information to the `Accelerator`

Pass the information with the {doxylink}`mobilint::Model::launch(Accelerator & acc)` method of `Model` object. It then uses the `Accelerator` object to run inference using this model.

### Step 4: Run inference using passed `Model` information and input data

Get the input data and run inference using the `mobilint::Model::infer()` method of `Model` object.

```python
model = qbruntime.Model(MXQ_FILE_PATH)
result = model.infer([INPUT])
```

### Inference Scenario

```python
## Python example
import qbruntime

MXQ_PATH = "path/to/mxq.mxq"

acc = qbruntime.Accelerator()               ## Step 1
model = qbruntime.Model(MXQ_PATH)           ## Step 2
model.launch(acc)                           ## Step 3

## Some preprocessing for input data

result = model.infer(preprocessed_input)    ## Step 4
```
sqlark 1.1.1
A lightweight Non-ORM with a builder pattern for querying a postgres database
Requires Python: <4.0,>=3.10

# Query Builder

A lightweight wrapper around psycopg2 for creating queries using a builder pattern.

Example Query:


## Getting Started

### Installation

Using pip
```sh
pip install git+https://github.com/MeadowlarkEngineering/query-builder.git#egg=query-builder
```

Using poetry
```sh
poetry add git+https://github.com/MeadowlarkEngineering/query-builder.git
```

### Usage

#### Select

Select everything from a table.

```python
from query_builder import PostgresConfig, Select
config = PostgresConfig(dbname="blog", user="postgres-username", password="postgres-password)
Select("comments").execute(config)
> [{'id': 1, 'text': "A comment"}]
```

Add joins, multiple where clauses, offsets, and limits.

```python
s = Select(table_name="posts").\
    join(left_table="posts", right_table="authors", left_col="author_id", right_col="id").\
    where(table="authors", column="id", operator="=", value=1).\
    where_and(table="authors", column="created_at", operator=">", value="2024-01-01").\
    where_and(table="authors", column="created_at", operator=">", value="2024-01-01").\
    limit(10).\
    offset(5).\
    order_by("created_at", table="posts")
result = s.execute(config)
```

Insert data
```python
i = Insert(table_name="posts").values([{"author_id": 1, "body": "this is a post"}]).on_conflict('id', 'update')
result = i.execute(config)
```

## Development
```sh
pip3 install --upgrade pip poetry
poetry self add "poetry-dynamic-versioning[plugin]"
poetry install
```

## Unit Testing

Start a postgres database. The tests don't modify the database, but do require an active psycopg2 connection.

```
docker run -d -e POSTGRES_PASSWORD=postgres -p 5432:5432 postgres
```

Run the unit tests
```
poetry run pytest
```
You may need to set PGUSER, PGDATABASE, and PGPASSWORD environment variables to establish the connection

Copyright 2024 - Meadowlark Engineering