libz 0.1.0__tar.gz → 0.2__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.
- libz-0.2/PKG-INFO +25 -0
- libz-0.2/README.md +18 -0
- {libz-0.1.0 → libz-0.2}/libz/AWT/prac3.py +2 -0
- libz-0.2/libz/DL/prac1.py +36 -0
- libz-0.2/libz/__init__.py +5 -0
- {libz-0.1.0 → libz-0.2}/libz/_core.py +4 -4
- libz-0.2/libz.egg-info/PKG-INFO +25 -0
- {libz-0.1.0 → libz-0.2}/pyproject.toml +2 -2
- libz-0.1.0/PKG-INFO +0 -16
- libz-0.1.0/README.md +0 -9
- libz-0.1.0/libz/DL/prac1.py +0 -4
- libz-0.1.0/libz/__init__.py +0 -11
- libz-0.1.0/libz.egg-info/PKG-INFO +0 -16
- {libz-0.1.0 → libz-0.2}/libz/AWT/__init__.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/AWT/prac1.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/AWT/prac10.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/AWT/prac2.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/AWT/prac4.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/AWT/prac5.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/AWT/prac6.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/AWT/prac7.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/AWT/prac8.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/AWT/prac9.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/BDA/__init__.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/BDA/prac1.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/BDA/prac10.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/BDA/prac2.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/BDA/prac3.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/BDA/prac4.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/BDA/prac5.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/BDA/prac6.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/BDA/prac7.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/BDA/prac8.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/BDA/prac9.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/BIO/__init__.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/BIO/prac1.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/BIO/prac10.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/BIO/prac2.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/BIO/prac3.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/BIO/prac4.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/BIO/prac5.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/BIO/prac6.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/BIO/prac7.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/BIO/prac8.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/BIO/prac9.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/DL/__init__.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/DL/prac10.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/DL/prac2.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/DL/prac3.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/DL/prac4.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/DL/prac5.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/DL/prac6.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/DL/prac7.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/DL/prac8.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz/DL/prac9.py +0 -0
- {libz-0.1.0 → libz-0.2}/libz.egg-info/SOURCES.txt +0 -0
- {libz-0.1.0 → libz-0.2}/libz.egg-info/dependency_links.txt +0 -0
- {libz-0.1.0 → libz-0.2}/libz.egg-info/top_level.txt +0 -0
- {libz-0.1.0 → libz-0.2}/setup.cfg +0 -0
libz-0.2/PKG-INFO
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: libz
|
|
3
|
+
Version: 0.2
|
|
4
|
+
Summary: A lightweight Python utility toolkit.
|
|
5
|
+
Requires-Python: >=3.7
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
|
|
8
|
+
# libz
|
|
9
|
+
|
|
10
|
+
A lightweight Python utility toolkit.
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
pip install libz
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```python
|
|
21
|
+
import libz
|
|
22
|
+
|
|
23
|
+
libz.DL.prac1()
|
|
24
|
+
libz.BDA.list()
|
|
25
|
+
```
|
libz-0.2/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# 1. Deep Forward Network
|
|
2
|
+
# Concept: binary classification with a feed-forward neural network.
|
|
3
|
+
# Dataset: breast cancer, built into scikit-learn.
|
|
4
|
+
|
|
5
|
+
from tensorflow import keras
|
|
6
|
+
from tensorflow.keras import layers
|
|
7
|
+
from sklearn.datasets import load_breast_cancer
|
|
8
|
+
from sklearn.model_selection import train_test_split
|
|
9
|
+
from sklearn.preprocessing import StandardScaler
|
|
10
|
+
|
|
11
|
+
# --- 1. DATA ---
|
|
12
|
+
X, y = load_breast_cancer(return_X_y=True)
|
|
13
|
+
|
|
14
|
+
X_train, X_test, y_train, y_test = train_test_split(
|
|
15
|
+
X, y, test_size=0.2, random_state=42, stratify=y
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
scaler = StandardScaler()
|
|
19
|
+
X_train = scaler.fit_transform(X_train)
|
|
20
|
+
X_test = scaler.transform(X_test)
|
|
21
|
+
|
|
22
|
+
# --- 2. MODEL ---
|
|
23
|
+
model = keras.Sequential([
|
|
24
|
+
layers.Dense(32, activation="relu"),
|
|
25
|
+
layers.Dense(16, activation="relu"),
|
|
26
|
+
layers.Dense(1, activation="sigmoid"),
|
|
27
|
+
])
|
|
28
|
+
|
|
29
|
+
model.compile(optimizer="adam", loss="binary_crossentropy", metrics=["accuracy"])
|
|
30
|
+
|
|
31
|
+
# --- 3. RUN ---
|
|
32
|
+
model.fit(X_train, y_train, epochs=20, batch_size=32)
|
|
33
|
+
|
|
34
|
+
# --- 4. RESULT ---
|
|
35
|
+
_, accuracy = model.evaluate(X_test, y_test, verbose=0)
|
|
36
|
+
print("Test accuracy:", accuracy)
|
|
@@ -3,7 +3,7 @@ import re
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
def register(module_name, namespace):
|
|
6
|
-
"""
|
|
6
|
+
"""Register the functions of a module."""
|
|
7
7
|
folder = os.path.dirname(namespace["__file__"])
|
|
8
8
|
subject = module_name.split(".")[-1]
|
|
9
9
|
numbers = sorted(
|
|
@@ -21,14 +21,14 @@ def register(module_name, namespace):
|
|
|
21
21
|
print(code)
|
|
22
22
|
|
|
23
23
|
prac.__name__ = "prac{}".format(n)
|
|
24
|
-
prac.__doc__ = "
|
|
24
|
+
prac.__doc__ = "{}.prac{}".format(subject, n)
|
|
25
25
|
return prac
|
|
26
26
|
|
|
27
27
|
for n in numbers:
|
|
28
28
|
namespace["prac{}".format(n)] = make(n)
|
|
29
29
|
|
|
30
30
|
def list_pracs():
|
|
31
|
-
"""
|
|
32
|
-
print("{}: {}".format(subject, ", ".join("prac{}".format(n) for n in numbers) or "
|
|
31
|
+
"""List available functions."""
|
|
32
|
+
print("{}: {}".format(subject, ", ".join("prac{}".format(n) for n in numbers) or "none"))
|
|
33
33
|
|
|
34
34
|
namespace["list"] = list_pracs
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: libz
|
|
3
|
+
Version: 0.2
|
|
4
|
+
Summary: A lightweight Python utility toolkit.
|
|
5
|
+
Requires-Python: >=3.7
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
|
|
8
|
+
# libz
|
|
9
|
+
|
|
10
|
+
A lightweight Python utility toolkit.
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
pip install libz
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```python
|
|
21
|
+
import libz
|
|
22
|
+
|
|
23
|
+
libz.DL.prac1()
|
|
24
|
+
libz.BDA.list()
|
|
25
|
+
```
|
|
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "libz"
|
|
7
|
-
version = "0.
|
|
8
|
-
description = "
|
|
7
|
+
version = "0.2"
|
|
8
|
+
description = "A lightweight Python utility toolkit."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.7"
|
|
11
11
|
|
libz-0.1.0/PKG-INFO
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: libz
|
|
3
|
-
Version: 0.1.0
|
|
4
|
-
Summary: Practical code for AWT, DL, BIO and BDA
|
|
5
|
-
Requires-Python: >=3.7
|
|
6
|
-
Description-Content-Type: text/markdown
|
|
7
|
-
|
|
8
|
-
# libz
|
|
9
|
-
|
|
10
|
-
Practical code for AWT, DL, BIO and BDA.
|
|
11
|
-
|
|
12
|
-
```python
|
|
13
|
-
import libz
|
|
14
|
-
libz.DL.prac1() # prints DL practical 1
|
|
15
|
-
libz.BDA.list() # lists BDA practicals
|
|
16
|
-
```
|
libz-0.1.0/README.md
DELETED
libz-0.1.0/libz/DL/prac1.py
DELETED
libz-0.1.0/libz/__init__.py
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"""libz - practical code for AWT, DL, BIO and BDA.
|
|
2
|
-
|
|
3
|
-
Usage:
|
|
4
|
-
import libz
|
|
5
|
-
libz.DL.prac1() # prints the code of DL practical 1
|
|
6
|
-
libz.DL.list() # shows which practicals are available
|
|
7
|
-
"""
|
|
8
|
-
from libz import AWT, DL, BIO, BDA
|
|
9
|
-
|
|
10
|
-
__version__ = "0.1.0"
|
|
11
|
-
__all__ = ["AWT", "DL", "BIO", "BDA"]
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: libz
|
|
3
|
-
Version: 0.1.0
|
|
4
|
-
Summary: Practical code for AWT, DL, BIO and BDA
|
|
5
|
-
Requires-Python: >=3.7
|
|
6
|
-
Description-Content-Type: text/markdown
|
|
7
|
-
|
|
8
|
-
# libz
|
|
9
|
-
|
|
10
|
-
Practical code for AWT, DL, BIO and BDA.
|
|
11
|
-
|
|
12
|
-
```python
|
|
13
|
-
import libz
|
|
14
|
-
libz.DL.prac1() # prints DL practical 1
|
|
15
|
-
libz.BDA.list() # lists BDA practicals
|
|
16
|
-
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|