This commit is contained in:
randogoth 2025-01-06 22:40:57 +02:00
parent 247eeef281
commit f6a9b2b0a4
6 changed files with 13 additions and 10 deletions

View file

@ -5,9 +5,9 @@ name = "pypi"
[packages] [packages]
randonautentropy = "*" randonautentropy = "*"
lyagushka = {path = "./lyagushka-0.1.0-py2.py3-none-any.whl"}
questionary = "*" questionary = "*"
rich = "*" rich = "*"
lyagushka = {file = "lyagushka-1.1.0-cp312-cp312-manylinux_2_34_x86_64.whl"}
[dev-packages] [dev-packages]

14
Pipfile.lock generated
View file

@ -1,7 +1,7 @@
{ {
"_meta": { "_meta": {
"hash": { "hash": {
"sha256": "975d223f73786424995bf72970bca39972d5a8f95ea6a1d0a4e369db83d38834" "sha256": "cf9f89003981e50e50317271f9598d64babff7a25b7099496a12eab7532f09e2"
}, },
"pipfile-spec": 6, "pipfile-spec": 6,
"requires": { "requires": {
@ -131,10 +131,10 @@
"version": "==3.10" "version": "==3.10"
}, },
"lyagushka": { "lyagushka": {
"file": "lyagushka-1.1.0-cp312-cp312-manylinux_2_34_x86_64.whl",
"hashes": [ "hashes": [
"sha256:cd9530f3b12d048e3549573c5afd383bc3498a1ee780b7daeb3640114d3e8fbd" "sha256:13df3298ca22f2a8b3022ae9af6f1072d22d496826200bf57852f1a1584f44b2"
], ]
"path": "./lyagushka-0.1.0-py2.py3-none-any.whl"
}, },
"markdown-it-py": { "markdown-it-py": {
"hashes": [ "hashes": [
@ -162,11 +162,11 @@
}, },
"pygments": { "pygments": {
"hashes": [ "hashes": [
"sha256:4755e6e64d22161d5b61432c0600c923c5927214e7c956e31c23923c89251a9b", "sha256:61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f",
"sha256:afc4146269910d4bdfabcd27c24923137a74d562a23a320a41a55ad303e19783" "sha256:9ea1544ad55cecf4b8242fab6dd35a93bbce657034b0611ee383099054ab6d8c"
], ],
"markers": "python_version >= '3.8'", "markers": "python_version >= '3.8'",
"version": "==2.19.0" "version": "==2.19.1"
}, },
"questionary": { "questionary": {
"hashes": [ "hashes": [

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -5,6 +5,7 @@ import questionary
from rich.console import Console from rich.console import Console
from rich.text import Text from rich.text import Text
from rich.progress import Progress, TextColumn, BarColumn from rich.progress import Progress, TextColumn, BarColumn
from pprint import pprint
def generate_random_data(size=1024, max_value=100): def generate_random_data(size=1024, max_value=100):
@ -26,11 +27,13 @@ def generate_random_data(size=1024, max_value=100):
return random_data return random_data
def pull_number(numbers: set, top: int, amount: int): def pull_number(numbers: set, top: int, amount: int):
dataset = generate_random_data(444, top-1) dataset = generate_random_data(top, top-1)
dataset.sort() dataset.sort()
pprint(dataset)
# calculate the anomalies in the data # calculate the anomalies in the data
zhaba = Lyagushka(dataset) zhaba = Lyagushka(dataset)
analysis_results = json.loads(zhaba.search(4.0, 10)) analysis_results = json.loads(zhaba.search(1.0, 3))
pprint(analysis_results)
pick = [obj for obj in analysis_results if obj['num_elements'] == max(obj['num_elements'] for obj in analysis_results)] pick = [obj for obj in analysis_results if obj['num_elements'] == max(obj['num_elements'] for obj in analysis_results)]
for p in pick: for p in pick:
if len(numbers) < amount: if len(numbers) < amount: