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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ff5da9b875f3f7649910fdc06a963c4d9a625d3025ba5ffc8113423f27ce920 |
|
MD5 | d00349772c4cfce151063407aa6f4eae |
|
BLAKE2b-256 | 4e86911e26b0445e38961e1e3bd731f01fb725a107e8bef311882aad1e07bdb1 |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 613bfa0463013a012d1572803903a226bbea55f00f5b77113eff8e3b99c14133 |
|
MD5 | 6f8c42b80a6890dd27e475273decb80a |
|
BLAKE2b-256 | 135620daca8443f4b21b5c290df37ec5309a2e64e26bb6ab12303f978fc9ad20 |