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.
Files changed (59) hide show
  1. libz-0.2/PKG-INFO +25 -0
  2. libz-0.2/README.md +18 -0
  3. {libz-0.1.0 → libz-0.2}/libz/AWT/prac3.py +2 -0
  4. libz-0.2/libz/DL/prac1.py +36 -0
  5. libz-0.2/libz/__init__.py +5 -0
  6. {libz-0.1.0 → libz-0.2}/libz/_core.py +4 -4
  7. libz-0.2/libz.egg-info/PKG-INFO +25 -0
  8. {libz-0.1.0 → libz-0.2}/pyproject.toml +2 -2
  9. libz-0.1.0/PKG-INFO +0 -16
  10. libz-0.1.0/README.md +0 -9
  11. libz-0.1.0/libz/DL/prac1.py +0 -4
  12. libz-0.1.0/libz/__init__.py +0 -11
  13. libz-0.1.0/libz.egg-info/PKG-INFO +0 -16
  14. {libz-0.1.0 → libz-0.2}/libz/AWT/__init__.py +0 -0
  15. {libz-0.1.0 → libz-0.2}/libz/AWT/prac1.py +0 -0
  16. {libz-0.1.0 → libz-0.2}/libz/AWT/prac10.py +0 -0
  17. {libz-0.1.0 → libz-0.2}/libz/AWT/prac2.py +0 -0
  18. {libz-0.1.0 → libz-0.2}/libz/AWT/prac4.py +0 -0
  19. {libz-0.1.0 → libz-0.2}/libz/AWT/prac5.py +0 -0
  20. {libz-0.1.0 → libz-0.2}/libz/AWT/prac6.py +0 -0
  21. {libz-0.1.0 → libz-0.2}/libz/AWT/prac7.py +0 -0
  22. {libz-0.1.0 → libz-0.2}/libz/AWT/prac8.py +0 -0
  23. {libz-0.1.0 → libz-0.2}/libz/AWT/prac9.py +0 -0
  24. {libz-0.1.0 → libz-0.2}/libz/BDA/__init__.py +0 -0
  25. {libz-0.1.0 → libz-0.2}/libz/BDA/prac1.py +0 -0
  26. {libz-0.1.0 → libz-0.2}/libz/BDA/prac10.py +0 -0
  27. {libz-0.1.0 → libz-0.2}/libz/BDA/prac2.py +0 -0
  28. {libz-0.1.0 → libz-0.2}/libz/BDA/prac3.py +0 -0
  29. {libz-0.1.0 → libz-0.2}/libz/BDA/prac4.py +0 -0
  30. {libz-0.1.0 → libz-0.2}/libz/BDA/prac5.py +0 -0
  31. {libz-0.1.0 → libz-0.2}/libz/BDA/prac6.py +0 -0
  32. {libz-0.1.0 → libz-0.2}/libz/BDA/prac7.py +0 -0
  33. {libz-0.1.0 → libz-0.2}/libz/BDA/prac8.py +0 -0
  34. {libz-0.1.0 → libz-0.2}/libz/BDA/prac9.py +0 -0
  35. {libz-0.1.0 → libz-0.2}/libz/BIO/__init__.py +0 -0
  36. {libz-0.1.0 → libz-0.2}/libz/BIO/prac1.py +0 -0
  37. {libz-0.1.0 → libz-0.2}/libz/BIO/prac10.py +0 -0
  38. {libz-0.1.0 → libz-0.2}/libz/BIO/prac2.py +0 -0
  39. {libz-0.1.0 → libz-0.2}/libz/BIO/prac3.py +0 -0
  40. {libz-0.1.0 → libz-0.2}/libz/BIO/prac4.py +0 -0
  41. {libz-0.1.0 → libz-0.2}/libz/BIO/prac5.py +0 -0
  42. {libz-0.1.0 → libz-0.2}/libz/BIO/prac6.py +0 -0
  43. {libz-0.1.0 → libz-0.2}/libz/BIO/prac7.py +0 -0
  44. {libz-0.1.0 → libz-0.2}/libz/BIO/prac8.py +0 -0
  45. {libz-0.1.0 → libz-0.2}/libz/BIO/prac9.py +0 -0
  46. {libz-0.1.0 → libz-0.2}/libz/DL/__init__.py +0 -0
  47. {libz-0.1.0 → libz-0.2}/libz/DL/prac10.py +0 -0
  48. {libz-0.1.0 → libz-0.2}/libz/DL/prac2.py +0 -0
  49. {libz-0.1.0 → libz-0.2}/libz/DL/prac3.py +0 -0
  50. {libz-0.1.0 → libz-0.2}/libz/DL/prac4.py +0 -0
  51. {libz-0.1.0 → libz-0.2}/libz/DL/prac5.py +0 -0
  52. {libz-0.1.0 → libz-0.2}/libz/DL/prac6.py +0 -0
  53. {libz-0.1.0 → libz-0.2}/libz/DL/prac7.py +0 -0
  54. {libz-0.1.0 → libz-0.2}/libz/DL/prac8.py +0 -0
  55. {libz-0.1.0 → libz-0.2}/libz/DL/prac9.py +0 -0
  56. {libz-0.1.0 → libz-0.2}/libz.egg-info/SOURCES.txt +0 -0
  57. {libz-0.1.0 → libz-0.2}/libz.egg-info/dependency_links.txt +0 -0
  58. {libz-0.1.0 → libz-0.2}/libz.egg-info/top_level.txt +0 -0
  59. {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,18 @@
1
+ # libz
2
+
3
+ A lightweight Python utility toolkit.
4
+
5
+ ## Installation
6
+
7
+ ```
8
+ pip install libz
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```python
14
+ import libz
15
+
16
+ libz.DL.prac1()
17
+ libz.BDA.list()
18
+ ```
@@ -2,3 +2,5 @@
2
2
  # TODO: paste the code for this practical here
3
3
 
4
4
  print("Hello from AWT practical 3")
5
+
6
+
@@ -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)
@@ -0,0 +1,5 @@
1
+ """libz - a lightweight Python utility toolkit."""
2
+ from libz import AWT, DL, BIO, BDA
3
+
4
+ __version__ = "0.2"
5
+ __all__ = ["AWT", "DL", "BIO", "BDA"]
@@ -3,7 +3,7 @@ import re
3
3
 
4
4
 
5
5
  def register(module_name, namespace):
6
- """Create prac1(), prac2(), ... functions for every pracN.py file next to the subject's __init__.py."""
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__ = "Print the code of {} practical {}.".format(subject, n)
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
- """Show the practicals available for this subject."""
32
- print("{}: {}".format(subject, ", ".join("prac{}".format(n) for n in numbers) or "no practicals"))
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.1.0"
8
- description = "Practical code for AWT, DL, BIO and BDA"
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
@@ -1,9 +0,0 @@
1
- # libz
2
-
3
- Practical code for AWT, DL, BIO and BDA.
4
-
5
- ```python
6
- import libz
7
- libz.DL.prac1() # prints DL practical 1
8
- libz.BDA.list() # lists BDA practicals
9
- ```
@@ -1,4 +0,0 @@
1
- # DL Practical 1
2
- # TODO: paste the code for this practical here
3
-
4
- print("Hello from DL practical 1")
@@ -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