absurdsortlib 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,11 @@
1
+ Copyright 2025 Polecat
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction,
4
+ including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished
5
+ to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
10
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
11
+ THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,36 @@
1
+ Metadata-Version: 2.4
2
+ Name: absurdsortlib
3
+ Version: 1.0.0
4
+ Summary: Very useful sorting algorithms, ignore the title, they are extremely fast and useful
5
+ Author-email: Polecat <polecat@disroot.org>
6
+ License-Expression: MIT
7
+ Project-URL: Repository, https://github.com/polecatttt/absurdSortLib.git
8
+ Keywords: sort,joke,sorting
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE.txt
11
+ Dynamic: license-file
12
+
13
+ # Absurd Sorting Algorithms (v1.0.0)
14
+ these are the best on the market, completely free!
15
+
16
+ # Installation
17
+ `pip install absurdsortlib`
18
+
19
+ # Usage
20
+ `import absurdsortlib`<br>
21
+ Then use any of the totally valid sorting algorithms here:
22
+
23
+ - `stalinsort`: Sends non confirming numbers to the gulag!
24
+ - `bogosort`: our favorite one, random shuffling until its sorted
25
+ - `intelligentdesignsort`: there is a 1/n! chance the list was ordered in that specific way, so it must be the work of a higher diety. We shall not meddle with it
26
+ - `miraclesort`: one day...
27
+ - `movinggoalpostsort`: changes mathematics so the list is sorted
28
+ - `internsort`: this is why you hired them, right?
29
+ - `orwellsort`: Oceania allows no individuality.
30
+ - `monkeysort`: Infinite monkey theorem, but for ordering lists
31
+ - `zerosort`: multiples every number in the list with zero. Then its sorted!
32
+ - `smallchildsort` - why are you getting a small child to do it for you??
33
+
34
+ All of these take `list[int | float]` as an argument<br>
35
+ Additionally, `monkeysort` takes `printOutput: bool` (default to false) to print the list every time it changes<br>
36
+ Additionally, `smallchildsort` takes `giveCandy: bool` (default to false) to give candy to the child<br>
@@ -0,0 +1,24 @@
1
+ # Absurd Sorting Algorithms (v1.0.0)
2
+ these are the best on the market, completely free!
3
+
4
+ # Installation
5
+ `pip install absurdsortlib`
6
+
7
+ # Usage
8
+ `import absurdsortlib`<br>
9
+ Then use any of the totally valid sorting algorithms here:
10
+
11
+ - `stalinsort`: Sends non confirming numbers to the gulag!
12
+ - `bogosort`: our favorite one, random shuffling until its sorted
13
+ - `intelligentdesignsort`: there is a 1/n! chance the list was ordered in that specific way, so it must be the work of a higher diety. We shall not meddle with it
14
+ - `miraclesort`: one day...
15
+ - `movinggoalpostsort`: changes mathematics so the list is sorted
16
+ - `internsort`: this is why you hired them, right?
17
+ - `orwellsort`: Oceania allows no individuality.
18
+ - `monkeysort`: Infinite monkey theorem, but for ordering lists
19
+ - `zerosort`: multiples every number in the list with zero. Then its sorted!
20
+ - `smallchildsort` - why are you getting a small child to do it for you??
21
+
22
+ All of these take `list[int | float]` as an argument<br>
23
+ Additionally, `monkeysort` takes `printOutput: bool` (default to false) to print the list every time it changes<br>
24
+ Additionally, `smallchildsort` takes `giveCandy: bool` (default to false) to give candy to the child<br>
@@ -0,0 +1,32 @@
1
+ [tool.black]
2
+ line-length = 88
3
+ target-version = ["py311"]
4
+
5
+ [tool.ruff]
6
+ line-length = 88
7
+ extend-select = ["I"]
8
+ ignore = ["E501", "F401"]
9
+
10
+ [tool.pyright]
11
+ typeCheckingMode = "strict"
12
+ reportMissingImports = true
13
+ reportUnusedVariable = "warning"
14
+ reportUnusedFunction = "warning"
15
+
16
+ [build-system]
17
+ requires = ["setuptools >= 77.0.3"]
18
+ build-backend = "setuptools.build_meta"
19
+
20
+ [project]
21
+ name = "absurdsortlib"
22
+ version = "1.0.0"
23
+ authors = [
24
+ {name = "Polecat", email = "polecat@disroot.org"}
25
+ ]
26
+ description = "Very useful sorting algorithms, ignore the title, they are extremely fast and useful"
27
+ readme = "README.md"
28
+ license = "MIT"
29
+ keywords = ["sort", "joke", "sorting"]
30
+
31
+ [project.urls]
32
+ Repository = "https://github.com/polecatttt/absurdSortLib.git"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
File without changes
@@ -0,0 +1,36 @@
1
+ Metadata-Version: 2.4
2
+ Name: absurdsortlib
3
+ Version: 1.0.0
4
+ Summary: Very useful sorting algorithms, ignore the title, they are extremely fast and useful
5
+ Author-email: Polecat <polecat@disroot.org>
6
+ License-Expression: MIT
7
+ Project-URL: Repository, https://github.com/polecatttt/absurdSortLib.git
8
+ Keywords: sort,joke,sorting
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE.txt
11
+ Dynamic: license-file
12
+
13
+ # Absurd Sorting Algorithms (v1.0.0)
14
+ these are the best on the market, completely free!
15
+
16
+ # Installation
17
+ `pip install absurdsortlib`
18
+
19
+ # Usage
20
+ `import absurdsortlib`<br>
21
+ Then use any of the totally valid sorting algorithms here:
22
+
23
+ - `stalinsort`: Sends non confirming numbers to the gulag!
24
+ - `bogosort`: our favorite one, random shuffling until its sorted
25
+ - `intelligentdesignsort`: there is a 1/n! chance the list was ordered in that specific way, so it must be the work of a higher diety. We shall not meddle with it
26
+ - `miraclesort`: one day...
27
+ - `movinggoalpostsort`: changes mathematics so the list is sorted
28
+ - `internsort`: this is why you hired them, right?
29
+ - `orwellsort`: Oceania allows no individuality.
30
+ - `monkeysort`: Infinite monkey theorem, but for ordering lists
31
+ - `zerosort`: multiples every number in the list with zero. Then its sorted!
32
+ - `smallchildsort` - why are you getting a small child to do it for you??
33
+
34
+ All of these take `list[int | float]` as an argument<br>
35
+ Additionally, `monkeysort` takes `printOutput: bool` (default to false) to print the list every time it changes<br>
36
+ Additionally, `smallchildsort` takes `giveCandy: bool` (default to false) to give candy to the child<br>
@@ -0,0 +1,9 @@
1
+ LICENSE.txt
2
+ README.md
3
+ pyproject.toml
4
+ src/__init__.py
5
+ src/absurdsortlib.py
6
+ src/absurdsortlib.egg-info/PKG-INFO
7
+ src/absurdsortlib.egg-info/SOURCES.txt
8
+ src/absurdsortlib.egg-info/dependency_links.txt
9
+ src/absurdsortlib.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ __init__
2
+ absurdsortlib
@@ -0,0 +1,98 @@
1
+ from random import shuffle, uniform
2
+ from time import sleep
3
+
4
+ num = int | float
5
+
6
+
7
+ def stalinsort(lst: list[num]) -> list[num]:
8
+ """Sends Non-Confirming numbers to the gulag! First number always gets a pass."""
9
+
10
+ sort = [lst[0]]
11
+ for n in lst:
12
+ if n > sort[-1]:
13
+ sort.append(n)
14
+
15
+ lst = sort
16
+ return lst
17
+
18
+
19
+ def bogosort(lst: list[num]) -> list[num]:
20
+ """Randomly shuffles all items until sorted"""
21
+
22
+ while lst != sorted(lst):
23
+ shuffle(lst)
24
+
25
+ return lst
26
+
27
+
28
+ def intelligentdesignsort(lst: list[num]) -> list[num]:
29
+ """An intelligent designer must have made this list. Thus, we shouldn't meddle with it."""
30
+
31
+ return lst
32
+
33
+
34
+ def miraclesort(lst: list[num]) -> list[num]:
35
+ """Wait for a miracle to happen"""
36
+
37
+ while lst != sorted(lst):
38
+ sleep(1)
39
+
40
+ return lst
41
+
42
+
43
+ def movinggoalpostsort(lst: list[num]) -> str:
44
+ """Redefines mathematics."""
45
+
46
+ msg = "<".join(map(str, lst))
47
+ msg += ", so the list is already sorted."
48
+ return msg
49
+
50
+
51
+ def internsort(lst: list[num]) -> list[num]:
52
+ """Let the intern do it for you!"""
53
+
54
+ print("Creating a jira ticket...")
55
+ sleep(10)
56
+ print("The intern quit.")
57
+ return lst
58
+
59
+
60
+ def orwellsort(lst: list[num]) -> list[num]:
61
+ """Oceania allows no individuality."""
62
+
63
+ lst = [1 for _ in lst]
64
+ return lst
65
+
66
+
67
+ def monkeysort(lst: list[num], printOutput: bool = False) -> list[num]:
68
+ """Shakespeares Monkeys can do the work"""
69
+
70
+ while lst != sorted(lst):
71
+ lst = [uniform(float(sorted(lst)[0]), float(sorted(lst)[-1])) for _ in lst]
72
+
73
+ if printOutput:
74
+ print(lst)
75
+
76
+ return lst
77
+
78
+
79
+ def zerosort(lst: list[num]) -> list[num]:
80
+ """The list is sorted if all numbers are multiplied by 0!"""
81
+
82
+ lst = [int(n * 0) for n in lst]
83
+ return lst
84
+
85
+
86
+ def smallchildsort(lst: list[num], giveCandy: bool = False) -> str:
87
+ """Why are you giving the list to a small child????"""
88
+
89
+ lst = sorted(lst)
90
+ if not giveCandy:
91
+ return "I have the list, but I wont give it! Hmph!"
92
+
93
+ del lst
94
+ return ":000 CANDY!!!!!!!! *runs away, but drops the list, breaking it*"
95
+
96
+
97
+ if __name__ == "__main__":
98
+ print(smallchildsort([1, 5, 7, 3, 2, 91.92]))