semvec/pypi-packages huggingface dataset:
django-parlor 0.0.3
Django model translations with even less nasty hacks.
Keywords: django, translation

# django-parlor

Django model translations with even less nasty hacks.

## Installation

```
pip install django-parlor
```

## Usage

```python
from django.contrib import admin
from django.db import models

from parlor.admin import TranslatableAdmin
from parlor.models import TranslatableModel


class MyModel(TranslatableModel):
    ...


class MyModelTranslation(models.Model):
    parent = MyModel.get_parent_field()
    language_code = MyModel.get_language_field()

    label = models.CharField(max_length=32)
    ...

    class Meta:
        unique_together = [('parent', 'language_code')]


admin.site.register(MyModel, TranslatableAdmin)

animal = MyModel.objects.create()
animal.translations.create(language_code='en', label='Frog')
animal.translations.create(language_code='de', label='Frosch')
print(animal.label)
```

## Status

Right now this is more of a proof-of-concept. If people are interested in this
library it could certainly be expanded.

## Relation to django-parler

### Standing on the Shoulders of Giants

There are two popular libraries for model translation in Django:
[django-modeltranslation](https://github.com/deschler/django-modeltranslation)
and [django-parler](https://github.com/django-parler/django-parler). The former
adds additional columns to the same table while the latter adds a new table for
each translatable model. Both of these libraries use a lot of magic which makes
them easy to use, but also leads to some hard-to-debug edge cases.

There is also
[django-translated-fields](https://github.com/matthiask/django-translated-fields),
which uses the same basic approach as django-modeltranslation, but with much
less magic (and much less lines of code).

Here I try to do something similar for django-parler, which has been
unmaintained for some time now.

### Migration

If you want to migrate from django-parler to django-parlor, you need to replace
all instances of `parler.TranslatedFields` by explicit translation models as
described above. Note that the `parent` field is called `master` in
django-parler.

To keep using the same data, you will also need to set `Meta.db_table` to the
name generated by django-parler (typically `myapp_mymodel_translation`).

Finally you should run `manage.py makemigrations`. The generated migrations
will only contain minor changes though.

### Conceptual differences

-   With django-parlor, the translation model must be created explicitly.
-   In the admin UI, django-parlor uses a stock inline instead of a custom
    tabbed interface.
-   django-parlor only provides basic attribute access while django-parler
    provides a lot more features.
labeltrain 4.0.6
Advanced Image Labeling Tool
Requires Python: >=3.8

🖼️ LabelTrain

LabelTrain** is a modern, lightweight image annotation tool built for speed, simplicity, and flexibility.  
It provides an intuitive interface for labeling objects in images and exporting annotations in popular formats such as **YOLO**, **Pascal VOC**, **COCO**, and **CSV**.


![LabelTrain Interface](images/Capture.JPG)
![LabelTrain Annotation](images/Capture2.JPG)

---

✨ Key Features
🎨 Modern & Customizable UI
- Sleek design built with **PyQt6**
- Multiple color themes (Blue Ocean, Dark Mode, Purple Dream, and more)
- Smooth animations and responsive layout

🧰 Advanced Annotation Tools
- Create, edit, move, and delete bounding boxes with ease
- Resize and drag annotations directly on the image
- Right-click context menu for quick actions
- Zoom, pan, and fit-to-window support for large images

🧩 Flexible Class Management
- Add, rename, delete, and reorder classes
- Includes **preset categories** (person, car, dog, etc.)
- Floating class panel for fast switching and editing

💾 Multiple Export Formats
- **YOLO (.txt)**
- **Pascal VOC (.xml)**
- **COCO (.json)**
- **CSV (.csv)**

⚙️ Smart Workflow
- Autosave and resume your last session
- Export progress tracking with detailed status
- Multithreaded export to prevent UI freezing

🖥️ Cross-Platform Support
Runs smoothly on **Windows**, **Linux**, and **macOS**.

---

Why LabelTrain?
LabelTrain is designed to balance **ease of use**, **modern design**, and **practical functionality**.  
Whether you're preparing datasets for computer vision, deep learning, or academic research — LabelTrain helps you focus on your work, not on the tool.

---

📦 Supported Formats Summary

| Format       | Extension | Description                  |
|---------------|------------|------------------------------|
| YOLO          | `.txt`     | Center-based coordinates      |
| Pascal VOC    | `.xml`     | XML-based object annotations  |
| COCO          | `.json`    | Standardized JSON dataset     |
| CSV           | `.csv`     | Simple tabular annotations    |

---

💡 Coming Soon
- Polygon and segmentation support  
- Dark-mode auto-switch  
- Cloud project sync  

---

> **LabelTrain** — Designed for creators, researchers, and developers who value clarity, performance, and modern design.
nastya-sort-lnu 0.2.6
Simple sort utility implemented in Python with Click
Requires Python: >=3.8
Keywords: sort cli utility unix

# nastya-sort

Lightweight implementation of Unix `sort` utility in Python with Click framework.

## Features

- ✅ Sort lines from files or stdin
- ✅ Numeric sorting with `-n` flag
- ✅ Reverse order with `-r` flag
- ✅ Docker support
- ✅ Compatible with Unix sort behavior

## Installation

### From source

```bash
git clone https://github.com/Nastia2004/nastya-sort-lnu.git
cd nastya-sort-lnu
pip install -e .
```

### Using Docker

```bash

# Or build locally
docker build -t nastya-sort .
```

## Usage

### Command Line Interface

```bash
# Sort lines from stdin
echo -e "banana\napple\ncherry" | sort

# Sort file contents
sort file.txt

# Numeric sort
echo -e "10\n2\n100\n20" | sort -n
# Output: 2, 10, 20, 100

# Reverse order
sort -r file.txt

# Combine options
sort -rn numbers.txt
```

## Command Options

| Option | Description |
|--------|-------------|
| `-n, --numeric` | Compare according to string numerical value |
| `-r, --reverse` | Reverse the result of comparisons |
| `-h, --help` | Show help message and exit |

## Examples

### Basic Sorting

```bash
# Alphabetical sort
cat names.txt | sort

# Sort and save to file
sort input.txt > sorted.txt
```

### Numeric Sorting

```bash
# Sort numbers correctly
echo -e "100\n20\n3\n1000" | sort -n
# Output:
# 3
# 20
# 100
# 1000
```

### Reverse Sorting

```bash
# Descending order
echo -e "a\nc\nb" | sort -r
# Output:
# c
# b
# a
```

### Combined with Other Tools

```bash
# Sort and remove duplicates
sort file.txt | uniq

# Sort CSV by second column
cut -d',' -f2 data.csv | sort -n

# Count and sort word frequency
cat text.txt | tr ' ' '\n' | sort | uniq -c | sort -rn
```

## Development

### Setup Environment

```bash
# Create virtual environment
python3 -m venv test
source test/bin/activate  # On Windows: venv\Scripts\activate

# Install in development mode
pip install -e .
```

### Building Docker Image

```bash
docker build -t nastya-sort .
docker run nastya-sort --help
```

### Testing

```bash
# Test basic sorting
echo -e "c\na\nb" | sort

# Test numeric sorting
echo -e "10\n2\n1" | sort -n

# Test with Docker
echo -e "3\n1\n2" | docker run -i nastya-sort -n
```


## Project Structure

```
nastya-sort/
├── nastya_sort/
│   ├── __init__.py       # Package version
│   └── cli.py            # CLI implementation
├── .github/
│   └── workflows/
│       └── docker-publish.yml  # CI/CD pipeline
├── Dockerfile            # Docker image definition
├── setup.py              # Package configuration
├── README.md             # This file
└── .gitignore           # Git ignore rules
```