Skip to main content

Really really bad sorting algorithms

Project description

How to use

pip install shitsort

example usage:

import shitsort

myarray = [1, 5, 12, 6, 6, 11]

print(shitsort.bogosort(myarray))
print(shitsort.multibogosort(myarray, 4)) # uses 4 processes
print(shitsort.bozosort(myarray))
print(shitsort.slowsort(myarray))
print(shitsort.permutationsort(myarray))
print(shitsort.multipermutationsort(myarray, 4)) # uses 4 processes

>>> [1, 5, 6, 6, 11, 12]
>>> [1, 5, 6, 6, 11, 12]
>>> [1, 5, 6, 6, 11, 12]
>>> [1, 5, 6, 6, 11, 12]
>>> [1, 5, 6, 6, 11, 12]
>>> [1, 5, 6, 6, 11, 12]

functions:

bogosort(array)

returns a new sorted array of array using the bogosort algorithm without modifying the passed in array. (pseudocode)

multibogosort(array, numthreads)

returns a new sorted array of array using the bogosort algorithm without modifying the passed in array, but on multiple processes simultaneously. The number of processes can be specified with numthreads. Causes absurd CPU usage.

bozosort(array)

returns a new sorted array using the bozosort algorithm, without modifying the passed in array. (paper includes pseudocode somewhere)

slowsort(array)

returns a new sorted array using the slowsort algorithm, without modifying the passed in array. (pseudocode)

permutationsort(array)

returns a new sorted array by creating every permutation of the passed in array and looking through them. Uses absurd amounts of memory.

multipermutationsort(array, numthreads)

returns a new sorted array by creating every permutation of the passed in array and looks through it on numthreads processes. Uses absurd amounts of memory and CPU.

contributors: sh6heer, jas-dzied

Licensed under GPL GNUv3

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

shitsort-1.2.0.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

shitsort-1.2.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file shitsort-1.2.0.tar.gz.

File metadata

  • Download URL: shitsort-1.2.0.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for shitsort-1.2.0.tar.gz
Algorithm Hash digest
SHA256 0ff5da9b875f3f7649910fdc06a963c4d9a625d3025ba5ffc8113423f27ce920
MD5 d00349772c4cfce151063407aa6f4eae
BLAKE2b-256 4e86911e26b0445e38961e1e3bd731f01fb725a107e8bef311882aad1e07bdb1

See more details on using hashes here.

File details

Details for the file shitsort-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: shitsort-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for shitsort-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 613bfa0463013a012d1572803903a226bbea55f00f5b77113eff8e3b99c14133
MD5 6f8c42b80a6890dd27e475273decb80a
BLAKE2b-256 135620daca8443f4b21b5c290df37ec5309a2e64e26bb6ab12303f978fc9ad20

See more details on using hashes here.

Supported by

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