dmitlibx 0.1.0__py3-none-any.whl

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.
dmitlibx/__init__.py ADDED
@@ -0,0 +1,2 @@
1
+ # Это файл может быть пустым или содержать инициализацию пакета
2
+ from .utils import clear, nod, nok, importlibs, average
dmitlibx/utils.py ADDED
@@ -0,0 +1,28 @@
1
+ import os
2
+ import importlib.util
3
+ import math
4
+ import operator
5
+ from rich.progress import Progress
6
+
7
+ def clear():
8
+ os.system("cls" if os.name == 'nt' else "clear")
9
+
10
+ def nod(numbers):
11
+ return reduce(operator.gcd, numbers)
12
+
13
+ def nok(numbers):
14
+ return reduce(lambda a, b: abs(a * b) // operator.gcd(a, b), numbers)
15
+
16
+ def average(scores):
17
+ if not scores:
18
+ return 0
19
+ return sum(scores) / len(scores)
20
+
21
+ def importlibs(libs):
22
+ with Progress() as progress:
23
+ task = progress.add_task("[green]Loading libraries...", total=len(libs))
24
+ for lib in libs:
25
+ spec = importlib.util.find_spec(lib)
26
+ if spec is None:
27
+ os.system(f"pip install --quiet {lib}")
28
+ progress.update(task, advance=1)
@@ -0,0 +1,36 @@
1
+ Metadata-Version: 2.2
2
+ Name: dmitlibx
3
+ Version: 0.1.0
4
+ Summary: Небольшая библиотека для упрощения привычных действий.
5
+ Home-page: https://github.com/Hieso/dmitlibx
6
+ Author: DmitX
7
+ Author-email: Hieso123@yandex.com
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.6
12
+ Description-Content-Type: text/markdown
13
+ Requires-Dist: rich
14
+ Dynamic: author
15
+ Dynamic: author-email
16
+ Dynamic: classifier
17
+ Dynamic: description
18
+ Dynamic: description-content-type
19
+ Dynamic: home-page
20
+ Dynamic: requires-dist
21
+ Dynamic: requires-python
22
+ Dynamic: summary
23
+
24
+ # Dmitallx
25
+ Hi, this is my first Python library.
26
+
27
+ ##Functions:
28
+ Clear the terminal (clear)
29
+ Find the greatest common divisor of numbers (nod)
30
+ Find the least common multiple of numbers (nok)
31
+ Install libraries (importlibs)
32
+
33
+ ## Installation
34
+
35
+ ```sh
36
+ pip install dmitallx
@@ -0,0 +1,6 @@
1
+ dmitlibx/__init__.py,sha256=LKEg242ks2laciURLC1o7yvs9MAwilBNK_c2gvf27Wg,173
2
+ dmitlibx/utils.py,sha256=Obn3kaJYtqLMyKC-IaMuqBDzQ_9gkKdhPD61ES0tBTM,777
3
+ dmitlibx-0.1.0.dist-info/METADATA,sha256=1xi8s3f9emKNzbrqo1t7iYR08p9sTqQ-b7OBDhR9U34,983
4
+ dmitlibx-0.1.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
5
+ dmitlibx-0.1.0.dist-info/top_level.txt,sha256=HK542VI_8mZs_L4uI0V-zhXQE6aNh75MO7aPcyO7mMc,9
6
+ dmitlibx-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (75.8.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ dmitlibx