Skip to main content

A collection of troll sorting algorithms

Project description

TrollSorts

PyPI version License: MIT Python Version

A Python library containing innovative (and highly unconventional) sorting algorithms designed to challenge traditional paradigms of data organization.


Table of Contents


Installation

You can install troll-sorts directly via pip:

pip install troll-sorts

For local engineering and development:

pip install .

Algorithms

Our suite currently includes four distinct sorting paradigms:

  • Communist Sort: Wealth redistributed equally
  • Capitalist Sort: All wealth to the top 1%
  • Island Sort: Strictly less than 18
  • Six-Seven Sort: Just 6-7

Usage

Integrating troll-sorts into your workflow is straightforward.

from troll_sorts import communist_sort, capitalist_sort, island_sort, six_seven_sort

# Sample unorganized data representing arbitrary values
arr = [10, 25, 4, 30, 15, 8]

# Apply the Communist Sort paradigm
print("Communist:", communist_sort(arr))
# Output: [15, 15, 15, 15, 15, 15]

# Apply the Capitalist Sort paradigm
print("Capitalist:", capitalist_sort(arr))
# Output: [0, 0, 0, 92, 0, 0]

# Apply the Island Sort paradigm
print("Island:", island_sort(arr))
# Output: [4, 8, 10, 15]

# Apply the Six-Seven Sort paradigm
print("Six-Seven:", six_seven_sort(arr))
# Output: [6, 7, 6, 7, 6, 7]

Command Line Interface

The package also includes an executable module providing a terminal welcome animation.

trollsorts

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

troll_sorts-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

troll_sorts-0.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file troll_sorts-0.1.0.tar.gz.

File metadata

  • Download URL: troll_sorts-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for troll_sorts-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b254cbb16f16b3722107967b51bb76c2d4b67ce406353b47207bd551469a30ba
MD5 d49817aaab325c4773164a8e9dfdffc2
BLAKE2b-256 0c469fd2515c9ec20802c03fb209027bde970e1a6a17f1d773f10f1238876226

See more details on using hashes here.

File details

Details for the file troll_sorts-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: troll_sorts-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for troll_sorts-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1a7d01afc7747b957416d04dc5a1eca8dea7249749c61efe4074c6dda68b4c2e
MD5 7092c64043b4f3297bf506100d79a076
BLAKE2b-256 263e53780b601420506d241cc938354fbb30c217410bf6f94fdc79f6b937f199

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page