semvec/pypi-packages huggingface dataset:
league-ranker 1.0.5
League ranking for arbitrary numbers of competitors.
License: MIT
Requires Python: >=3.7

League Ranker
=============

|Build Status| |PyPI - Version|

Given a collection of entrants and their scores, sort them and return their
ranked points.

The mechanism used to allocate the ranked points is a generalised form of that
used for the `Student Robotics <https://www.studentrobotics.org>`__ league
points (quote from the SR
`rulebook <https://www.studentrobotics.org/docs/rules>`__):

    The team with the **most** game points will be awarded 8 points
    towards the competition league. The team with the second most will
    be awarded 6. The team with the third most will be awarded 4 points,
    and the team with the fewest game points will be awarded 2 points.
    Teams whose robot was not entered into the round, or who were
    disqualified from the round, will be awarded no points.

    Tied robots will be awarded the average of the points that their
    combined positions would be awarded. Thus, three robots tied for
    first place would receive 6 points each (since this is
    ``(8+6+4)/3``).

The ranker supports an arbitrary number of entrants and zones (as long as there
are fewer entrants than zones) and will return points which follow the pattern
described above.

The points for the winning team will be 2 × the number of zones, points for
subsequent places reduce by 2 points per place. Ties are resolved as described
and as a result of the points per place reducing by two, the points for any
entrant will always be an integer.

It supports Python 3.7+.

Tests
~~~~~

Tests can be run for the current interpreter by running ``./run-tests`` or for
all supported available interpreters by running ``tox``.

.. |Build Status| image:: https://circleci.com/gh/PeterJCLaw/ranker.svg?style=svg
   :target: https://circleci.com/gh/PeterJCLaw/ranker

.. |PyPI - Version| image:: https://img.shields.io/pypi/v/league-ranker
   :target: https://pypi.org/project/league-ranker/
zipcreator-sebastian-stigler 0.1.1
Creates a zip archive, excluding files matching .zipignore patterns, and adds a prefix inside the archive
License: MIT
Requires Python: >=3.10

# Zip Creator with Ignore Support

This Python script creates a zip archive of a folder while respecting an ignore
file (similar to `.gitignore`). It also supports adding a prefix to all files
inside the archive, similar to `git archive --prefix`.

## Features

- Exclude files and folders using a `.zipignore` file (or a custom ignore file)
- Add an optional prefix inside the zip
- Command-line interface for easy use

## Installation

Ensure you have Python >= 3.10 installed and install it with `pipx`:

```bash
pipx install zipcreater-sebastian-stigler
```

## Usage

```bash
zipcreator [-h] [-o OUTPUT_ZIP] [--ignore-file IGNORE_FILE] [--prefix PREFIX] source_folder


positional arguments:
  source_folder         Folder to zip

options:
  -h, --help            show this help message and exit
  -o OUTPUT_ZIP, --output_zip OUTPUT_ZIP
                        Output zip file name (default: archive.zip)
  --ignore-file IGNORE_FILE
                        Ignore file (default: .zipignore)
  --prefix PREFIX       Prefix inside the zip (e.g., 'myproject/')
  --version             show program's version number and exit
```

### Examples

#### 1. Basic Usage

```bash
zipcreator my_folder -o output.zip
```

This zips `my_folder` into `output.zip`, using `.zipignore` within `my_folder` to exclude files.

#### 2. Add a Prefix

```bash
zipcreator my_folder -o output.zip --prefix myproject/
```

This adds `myproject/` as a prefix inside the zip.

#### 3. Use a Custom Ignore File

```bash
zipcreator my_folder -o output.zip --ignore-file custom.ignore
```

This uses `custom.ignore` instead of `.zipignore`. (The file has to be stored in `my_folder`.)

## Example `.zipignore` File

```text
# Ignore log files
*.log

# Ignore temporary files
*.tmp
*.bak

# Ignore folders
node_modules/
venv/

# Ignore specific files
secrets.env
debug-output.txt

# Ignore system files
.DS_Store
Thumbs.db

# Ignore __pycache__ directories
__pycache__/

# Ignore build outputs
build/
dist/

# Allow a specific file inside an ignored folder
!dist/readme.txt
```

## Example Output with `--prefix myproject/`

If your original `my_folder` structure is:

```console
my_folder/
│── file1.txt
│── file2.log
│── subdir/
│   └── nested.txt
```

And `.zipignore` contains:

```text
*.log
```

Then `output.zip` will contain:

```console
myproject/file1.txt
myproject/subdir/nested.txt
```

(`file2.log` is ignored due to `.zipignore`)

## Licence

MIT Licence

## Credit

Created with ChatGPT.