semvec/pypi-packages huggingface dataset:
linetable 0.0.3
library to manage Python Locations Table (co_linetable)
License: MIT

About linetable
---------------

.. image:: https://github.com/amol-/linetable/actions/workflows/run-tests.yml/badge.svg
    :target: https://github.com/amol-/linetable/actions/workflows/run-tests.yml

.. image:: https://coveralls.io/repos/amol-/linetable/badge.svg
    :target: https://coveralls.io/r/amol-/linetable

.. image:: https://img.shields.io/pypi/v/linetable.svg
   :target: https://pypi.python.org/pypi/linetable

.. image:: https://img.shields.io/pypi/pyversions/linetable.svg
    :target: https://pypi.python.org/pypi/linetable

.. image:: https://img.shields.io/pypi/l/linetable.svg
    :target: https://pypi.python.org/pypi/linetable

linetable is a library parse and generate co_linetable attributes in Python code objects.

Based on https://github.com/python/cpython/blob/main/Objects/locations.md

Installing
----------

linetable can be installed from pypi::

    pip install linetable

should just work for most of the users

Usage
-----

Existing linetable can be parsed using ``linetable.parse_linetable``::

    >>> def testfunc():
    ...   x = 3
    ...   y = x + 1
    ...   return y

    >>> list(linetable.parse_linetable(testfunc.__code__.co_linetable))
    [
        (1, 1, 1, 0, 0),
        (1, 2, 2, 6, 7),
        (1, 2, 2, 2, 3),
        (1, 3, 3, 6, 7),
        (1, 3, 3, 10, 11),
        (2, 3, 3, 6, 11),
        (1, 3, 3, 2, 3),
        (1, 4, 4, 9, 10),
        (1, 4, 4, 2, 10),
    ]

If you prefer the output in the format of ``dis.Positions`` objects,
you can create them from the yielded values::

    >>> [dis.Positions(*e[1:]) for e in linetable.parse_linetable(testfunc.__code__.co_linetable)]
    [Positions(lineno=1, end_lineno=1, col_offset=0, end_col_offset=0), Positions(lineno=2, end_lineno=2, col_offset=8, end_col_offset=9), Positions(lineno=2, end_lineno=2, col_offset=4, end_col_offset=5), Positions(lineno=3, end_lineno=3, col_offset=8, end_col_offset=9), Positions(lineno=3, end_lineno=3, col_offset=12, end_col_offset=13), Positions(lineno=3, end_lineno=3, col_offset=8, end_col_offset=13), Positions(lineno=3, end_lineno=3, col_offset=4, end_col_offset=5), Positions(lineno=4, end_lineno=4, col_offset=11, end_col_offset=12), Positions(lineno=4, end_lineno=4, col_offset=4, end_col_offset=12)]

If you have the linetable, you can generate back the binary encoded version
using ``linetable.generate_linetable``::

    >>> lt = [
    ...     (1, 1, 1, 0, 0),
    ...     (1, 2, 2, 6, 7),
    ...     (1, 2, 2, 2, 3),
    ...     (1, 3, 3, 6, 7),
    ...     (1, 3, 3, 10, 11),
    ...     (2, 3, 3, 6, 11),
    ...     (1, 3, 3, 2, 3),
    ...     (1, 4, 4, 9, 10),
    ...     (1, 4, 4, 2, 10),
    ... ]
    >>> linetable.generate_linetable(lt)
    b"\x80\x00\xd8\x06\x07\x80!\xd8\x06\x07\x88!\x81e\x80!\xd8\t\n\x80("
sydraw 0.0.3
A python library that helps you create synthetic 2D point clouds dataset
License: MIT
Requires Python: >=3.9.5,<3.12

# Sydraw

<h1 align="center">
<img src="https://github.com/WilliamBonvini/sydraw/raw/master/docs/media/imgs/sydraw.jpeg" width="150">
</h1><br>

[![PyPI License](https://img.shields.io/pypi/l/sydraw.svg)](https://pypi.org/project/sydraw)
[![PyPI Version](https://img.shields.io/pypi/v/sydraw.svg)](https://pypi.org/project/sydraw)
[![PyPI Downloads](https://img.shields.io/pypi/dm/sydraw.svg?color=orange)](https://pypistats.org/packages/sydraw)
![](https://img.shields.io/badge/contributions-welcome-green.svg)

Sydraw is a python library that helps you create synthetic 2D point clouds for single/multi-model single/multi-class tasks.  
It gives you the possibility to fix a set of hyper-parameters (i.e. outliers percentage, noise) for the parametric models you want to generate.  

|                                        Single Class - Single Model                                         |                                        Single Class -  Multi Model                                         |                                         Multi Class - Multi Model                                          |   
|:----------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------:|
| <img src="https://github.com/WilliamBonvini/sydraw/raw/master/docs/media/imgs/scsm1.png" style="zoom:50%"> | <img src="https://github.com/WilliamBonvini/sydraw/raw/master/docs/media/imgs/scmm1.png" style="zoom:50%"> | <img src="https://github.com/WilliamBonvini/sydraw/raw/master/docs/media/imgs/mcmm1.png" style="zoom:50%"> |
                        

## Setup

### Requirements

* Python 3.9+

### Installation

Install it directly into an activated virtual environment:

```text
$ pip install sydraw
```

or add it to your [Poetry](https://poetry.eustace.io/) project:

```text
$ poetry add sydraw
```

## Usage

After installation, the package can be imported:

```text
$ python
>>> import sydraw
>>> sydraw.__version__
```

Currently supported parametric models:
* circle
* ellipse
* line
* hyperbola