pamdays 0.1.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.
Files changed (78) hide show
  1. pamdays-0.1.0/LICENSE +21 -0
  2. pamdays-0.1.0/PKG-INFO +177 -0
  3. pamdays-0.1.0/README.md +142 -0
  4. pamdays-0.1.0/pyproject.toml +29 -0
  5. pamdays-0.1.0/setup.cfg +4 -0
  6. pamdays-0.1.0/src/pamdays/__init__.py +55 -0
  7. pamdays-0.1.0/src/pamdays/aidsbd/__init__.py +72 -0
  8. pamdays-0.1.0/src/pamdays/aidsbd/p1.py +80 -0
  9. pamdays-0.1.0/src/pamdays/aidsbd/p10.py +176 -0
  10. pamdays-0.1.0/src/pamdays/aidsbd/p11.py +79 -0
  11. pamdays-0.1.0/src/pamdays/aidsbd/p2.py +93 -0
  12. pamdays-0.1.0/src/pamdays/aidsbd/p3.py +113 -0
  13. pamdays-0.1.0/src/pamdays/aidsbd/p4.py +213 -0
  14. pamdays-0.1.0/src/pamdays/aidsbd/p5.py +53 -0
  15. pamdays-0.1.0/src/pamdays/aidsbd/p6.py +61 -0
  16. pamdays-0.1.0/src/pamdays/aidsbd/p7.py +93 -0
  17. pamdays-0.1.0/src/pamdays/aidsbd/p8.py +77 -0
  18. pamdays-0.1.0/src/pamdays/aidsbd/p9.py +167 -0
  19. pamdays-0.1.0/src/pamdays/core.py +161 -0
  20. pamdays-0.1.0/src/pamdays/display.py +24 -0
  21. pamdays-0.1.0/src/pamdays/dstt/__init__.py +59 -0
  22. pamdays-0.1.0/src/pamdays/dstt/p1.py +68 -0
  23. pamdays-0.1.0/src/pamdays/dstt/p2.py +181 -0
  24. pamdays-0.1.0/src/pamdays/dstt/p3.py +99 -0
  25. pamdays-0.1.0/src/pamdays/dstt/p4.py +52 -0
  26. pamdays-0.1.0/src/pamdays/dstt/p5.py +53 -0
  27. pamdays-0.1.0/src/pamdays/dstt/p6.py +47 -0
  28. pamdays-0.1.0/src/pamdays/dstt/p7.py +64 -0
  29. pamdays-0.1.0/src/pamdays/dstt/p8.py +66 -0
  30. pamdays-0.1.0/src/pamdays/mobile/__init__.py +45 -0
  31. pamdays-0.1.0/src/pamdays/mobile/p1.py +49 -0
  32. pamdays-0.1.0/src/pamdays/mobile/p2.py +51 -0
  33. pamdays-0.1.0/src/pamdays/mobile/p3.py +85 -0
  34. pamdays-0.1.0/src/pamdays/mobile/p4.py +130 -0
  35. pamdays-0.1.0/src/pamdays/mobile/p5.py +101 -0
  36. pamdays-0.1.0/src/pamdays/programming/__init__.py +30 -0
  37. pamdays-0.1.0/src/pamdays/programming/cloud/__init__.py +37 -0
  38. pamdays-0.1.0/src/pamdays/programming/cloud/p1.py +63 -0
  39. pamdays-0.1.0/src/pamdays/programming/cloud/p2.py +63 -0
  40. pamdays-0.1.0/src/pamdays/programming/cloud/p3.py +56 -0
  41. pamdays-0.1.0/src/pamdays/programming/cloud/p4.py +44 -0
  42. pamdays-0.1.0/src/pamdays/programming/cybersecurity/__init__.py +39 -0
  43. pamdays-0.1.0/src/pamdays/programming/cybersecurity/p1.py +126 -0
  44. pamdays-0.1.0/src/pamdays/programming/cybersecurity/p2.py +66 -0
  45. pamdays-0.1.0/src/pamdays/programming/cybersecurity/p3.py +63 -0
  46. pamdays-0.1.0/src/pamdays/programming/cybersecurity/p4.py +60 -0
  47. pamdays-0.1.0/src/pamdays/programming/nlp/__init__.py +48 -0
  48. pamdays-0.1.0/src/pamdays/programming/nlp/p1.py +68 -0
  49. pamdays-0.1.0/src/pamdays/programming/nlp/p2.py +51 -0
  50. pamdays-0.1.0/src/pamdays/programming/nlp/p3.py +78 -0
  51. pamdays-0.1.0/src/pamdays/programming/nlp/p4.py +88 -0
  52. pamdays-0.1.0/src/pamdays/programming/nlp/p5.py +66 -0
  53. pamdays-0.1.0/src/pamdays/programming/nnfl/__init__.py +37 -0
  54. pamdays-0.1.0/src/pamdays/programming/nnfl/p1.py +71 -0
  55. pamdays-0.1.0/src/pamdays/programming/nnfl/p2.py +68 -0
  56. pamdays-0.1.0/src/pamdays/programming/nnfl/p3.py +57 -0
  57. pamdays-0.1.0/src/pamdays/programming/nnfl/p4.py +55 -0
  58. pamdays-0.1.0/src/pamdays/programming/uiux/__init__.py +38 -0
  59. pamdays-0.1.0/src/pamdays/programming/uiux/p1.py +53 -0
  60. pamdays-0.1.0/src/pamdays/programming/uiux/p2.py +57 -0
  61. pamdays-0.1.0/src/pamdays/programming/uiux/p3.py +50 -0
  62. pamdays-0.1.0/src/pamdays/programming/uiux/p4.py +48 -0
  63. pamdays-0.1.0/src/pamdays/programming/webtech/__init__.py +38 -0
  64. pamdays-0.1.0/src/pamdays/programming/webtech/p1.py +52 -0
  65. pamdays-0.1.0/src/pamdays/programming/webtech/p2.py +68 -0
  66. pamdays-0.1.0/src/pamdays/programming/webtech/p3.py +98 -0
  67. pamdays-0.1.0/src/pamdays/programming/webtech/p4.py +82 -0
  68. pamdays-0.1.0/src/pamdays/registry.py +50 -0
  69. pamdays-0.1.0/src/pamdays/search.py +60 -0
  70. pamdays-0.1.0/src/pamdays.egg-info/PKG-INFO +177 -0
  71. pamdays-0.1.0/src/pamdays.egg-info/SOURCES.txt +76 -0
  72. pamdays-0.1.0/src/pamdays.egg-info/dependency_links.txt +1 -0
  73. pamdays-0.1.0/src/pamdays.egg-info/requires.txt +24 -0
  74. pamdays-0.1.0/src/pamdays.egg-info/top_level.txt +1 -0
  75. pamdays-0.1.0/tests/test_aliases.py +96 -0
  76. pamdays-0.1.0/tests/test_api.py +131 -0
  77. pamdays-0.1.0/tests/test_practicals.py +104 -0
  78. pamdays-0.1.0/tests/test_registry.py +36 -0
pamdays-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 PAMDays Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
pamdays-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,177 @@
1
+ Metadata-Version: 2.4
2
+ Name: pamdays
3
+ Version: 0.1.0
4
+ Summary: Subject-wise practical-code library for TY B.Tech AI & DS students
5
+ Author: Soham
6
+ License: MIT
7
+ Keywords: education,practical,AI,data science,KKWIEER
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Intended Audience :: Education
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.9
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Provides-Extra: ds
16
+ Requires-Dist: numpy; extra == "ds"
17
+ Requires-Dist: pandas; extra == "ds"
18
+ Requires-Dist: matplotlib; extra == "ds"
19
+ Requires-Dist: scikit-learn; extra == "ds"
20
+ Provides-Extra: nlp
21
+ Requires-Dist: nltk; extra == "nlp"
22
+ Requires-Dist: gensim; extra == "nlp"
23
+ Provides-Extra: nn
24
+ Requires-Dist: tensorflow; extra == "nn"
25
+ Provides-Extra: spark
26
+ Requires-Dist: pyspark; extra == "spark"
27
+ Provides-Extra: all
28
+ Requires-Dist: numpy; extra == "all"
29
+ Requires-Dist: pandas; extra == "all"
30
+ Requires-Dist: matplotlib; extra == "all"
31
+ Requires-Dist: scikit-learn; extra == "all"
32
+ Requires-Dist: nltk; extra == "all"
33
+ Requires-Dist: gensim; extra == "all"
34
+ Dynamic: license-file
35
+
36
+ # PAMDays
37
+
38
+ A lightweight, exam-oriented Python practical library for **TY B.Tech Artificial Intelligence & Data Science** students (K.K. Wagh Institute of Engineering Education and Research, 2023 Pattern).
39
+
40
+ PAMDays organizes lab practicals by subject and official practical number (`p1`, `p2`, ...), exposes memorable concept aliases (`astar`, `minimax`, `knn`, ...), prints clean source code or workflow guides, displays exam metadata (aim, algorithm, sample I/O, complexity), and executes runnable Python practicals interactively in a child process.
41
+
42
+ ---
43
+
44
+ ## Installation
45
+
46
+ Install locally in editable mode (requires Python 3.9+):
47
+
48
+ ```bash
49
+ pip install -e .
50
+ ```
51
+
52
+ Core `import pamdays` has **zero required third-party dependencies**—printing code, viewing metadata, and searching work immediately in a clean Python environment.
53
+
54
+ ### Optional Dependencies
55
+
56
+ Install optional packages only for the practicals that need them:
57
+
58
+ ```bash
59
+ pip install -e ".[ds]" # numpy, pandas, matplotlib, scikit-learn (aidsbd p7-p11, dstt p3)
60
+ pip install -e ".[nlp]" # nltk, gensim (programming.nlp)
61
+ pip install -e ".[nn]" # tensorflow (programming.nnfl p2)
62
+ pip install -e ".[spark]" # pyspark (dstt p2)
63
+ pip install -e ".[all]" # ds + nlp extras
64
+ ```
65
+
66
+ ---
67
+
68
+ ## Quick Start
69
+
70
+ ```python
71
+ import pamdays
72
+
73
+ # List available subjects
74
+ print(pamdays.subjects())
75
+
76
+ # Print complete source code
77
+ print(pamdays.aidsbd.p1)
78
+ print(pamdays.aidsbd.astar)
79
+
80
+ # Access code string directly
81
+ code_str = pamdays.aidsbd.p1.code
82
+
83
+ # View aim, algorithm, sample I/O, and complexity
84
+ pamdays.aidsbd.p1.info()
85
+
86
+ # View both metadata and code together
87
+ pamdays.aidsbd.p1.show()
88
+
89
+ # Run a Python practical interactively
90
+ pamdays.aidsbd.p1.run()
91
+ ```
92
+
93
+ ---
94
+
95
+ ## Subjects
96
+
97
+ | Alias | Official Subject | Course Code | Semester | Practicals |
98
+ |---|---|---|---|---|
99
+ | `pamdays.aidsbd` | Artificial Intelligence & Data Science and Big Data Lab | `2311304` (`2301304` on p.1) | V | `p1`–`p11` |
100
+ | `pamdays.dstt` | Data Science Techniques and Tools Lab | `2311313` | VI | `p1`–`p8` |
101
+ | `pamdays.programming` | Programming Lab (6 elective tracks) | `2311316` | VI | Track-specific |
102
+ | `pamdays.mobile` | Mobile Application Development | `2311319` | VI | `p1`–`p5` |
103
+
104
+ ### Programming Lab Electives
105
+
106
+ ```python
107
+ pamdays.programming.uiux # 2301314A - UI/UX Design (p1-p4)
108
+ pamdays.programming.nnfl # 2311314B - Neural Network and Fuzzy Logic (p1-p4)
109
+ pamdays.programming.webtech # 2311314C - Web Technology (p1-p4)
110
+ pamdays.programming.cloud # 2301315A - Cloud Computing (p1-p4)
111
+ pamdays.programming.nlp # 2301315B - Natural Language Processing (p1-p5)
112
+ pamdays.programming.cybersecurity # 2311315C - Cyber Security (p1-p4)
113
+ ```
114
+
115
+ ---
116
+
117
+ ## Concept Aliases & Alternatives
118
+
119
+ Concept aliases point to the exact practical object:
120
+
121
+ ```python
122
+ pamdays.aidsbd.astar is pamdays.aidsbd.p1 # True
123
+ pamdays.aidsbd.minimax is pamdays.aidsbd.p2 # True
124
+ pamdays.programming.nlp.tokenization is pamdays.programming.nlp.p1 # True
125
+ ```
126
+
127
+ Where an official practical contains multiple problems or OR-alternatives, official numbering is preserved and alternatives are exposed as child attributes:
128
+
129
+ ```python
130
+ pamdays.aidsbd.p4.nqueens
131
+ pamdays.aidsbd.p4.graphcoloring
132
+ pamdays.aidsbd.p4.sudoku
133
+
134
+ pamdays.aidsbd.p9.linear
135
+ pamdays.aidsbd.p9.logistic
136
+
137
+ pamdays.aidsbd.p10.svm
138
+ pamdays.aidsbd.p10.knn
139
+
140
+ pamdays.dstt.p2.httpstatus
141
+ pamdays.dstt.p2.tophosts
142
+ pamdays.dstt.p2.endpoints
143
+ pamdays.dstt.p2.errors404
144
+ ```
145
+
146
+ ---
147
+
148
+ ## Listing & Searching
149
+
150
+ ```python
151
+ pamdays.aidsbd.list()
152
+ pamdays.aidsbd.list(detailed=True)
153
+ pamdays.aidsbd.get(1)
154
+ pamdays.aidsbd.get("astar")
155
+
156
+ pamdays.search("minimax")
157
+ pamdays.search("linear regression")
158
+ ```
159
+
160
+ ---
161
+
162
+ ## Known Limitations (Non-Python Assignments)
163
+
164
+ Several curriculum practicals are not Python programs—for example, Hadoop study notes (`dstt.p1`), Tableau/Power BI GUI workflows (`dstt.p4`–`p8`), UI/UX Figma design (`programming.uiux`), HTML/JS/Express (`programming.webtech`), CloudSim/KVM/Apex (`programming.cloud`), security audit/ZAP labs (`programming.cybersecurity.p3`–`p4`), and Flutter/Android Studio projects (`mobile.p1`–`p5`).
165
+
166
+ For these entries:
167
+ - `print(practical)` prints clean instructions, checklists, or target-language code (Dart, HTML, JS, Java, Apex).
168
+ - `.run()` does not pretend to execute them in Python; it clearly informs the user why and displays the relevant workflow instructions.
169
+
170
+ ---
171
+
172
+ ## Contributing a New Practical
173
+
174
+ 1. Add a module `p<N>.py` inside the target subject folder under `src/pamdays/<subject>/`.
175
+ 2. Instantiate `Practical(...)` and register it with `register("<subject>", practical, aliases=[...])`.
176
+ 3. Import and expose `p<N>` and its concept alias(es) in the subject's `__init__.py`.
177
+ 4. Add unit tests in `tests/` and run `pytest`.
@@ -0,0 +1,142 @@
1
+ # PAMDays
2
+
3
+ A lightweight, exam-oriented Python practical library for **TY B.Tech Artificial Intelligence & Data Science** students (K.K. Wagh Institute of Engineering Education and Research, 2023 Pattern).
4
+
5
+ PAMDays organizes lab practicals by subject and official practical number (`p1`, `p2`, ...), exposes memorable concept aliases (`astar`, `minimax`, `knn`, ...), prints clean source code or workflow guides, displays exam metadata (aim, algorithm, sample I/O, complexity), and executes runnable Python practicals interactively in a child process.
6
+
7
+ ---
8
+
9
+ ## Installation
10
+
11
+ Install locally in editable mode (requires Python 3.9+):
12
+
13
+ ```bash
14
+ pip install -e .
15
+ ```
16
+
17
+ Core `import pamdays` has **zero required third-party dependencies**—printing code, viewing metadata, and searching work immediately in a clean Python environment.
18
+
19
+ ### Optional Dependencies
20
+
21
+ Install optional packages only for the practicals that need them:
22
+
23
+ ```bash
24
+ pip install -e ".[ds]" # numpy, pandas, matplotlib, scikit-learn (aidsbd p7-p11, dstt p3)
25
+ pip install -e ".[nlp]" # nltk, gensim (programming.nlp)
26
+ pip install -e ".[nn]" # tensorflow (programming.nnfl p2)
27
+ pip install -e ".[spark]" # pyspark (dstt p2)
28
+ pip install -e ".[all]" # ds + nlp extras
29
+ ```
30
+
31
+ ---
32
+
33
+ ## Quick Start
34
+
35
+ ```python
36
+ import pamdays
37
+
38
+ # List available subjects
39
+ print(pamdays.subjects())
40
+
41
+ # Print complete source code
42
+ print(pamdays.aidsbd.p1)
43
+ print(pamdays.aidsbd.astar)
44
+
45
+ # Access code string directly
46
+ code_str = pamdays.aidsbd.p1.code
47
+
48
+ # View aim, algorithm, sample I/O, and complexity
49
+ pamdays.aidsbd.p1.info()
50
+
51
+ # View both metadata and code together
52
+ pamdays.aidsbd.p1.show()
53
+
54
+ # Run a Python practical interactively
55
+ pamdays.aidsbd.p1.run()
56
+ ```
57
+
58
+ ---
59
+
60
+ ## Subjects
61
+
62
+ | Alias | Official Subject | Course Code | Semester | Practicals |
63
+ |---|---|---|---|---|
64
+ | `pamdays.aidsbd` | Artificial Intelligence & Data Science and Big Data Lab | `2311304` (`2301304` on p.1) | V | `p1`–`p11` |
65
+ | `pamdays.dstt` | Data Science Techniques and Tools Lab | `2311313` | VI | `p1`–`p8` |
66
+ | `pamdays.programming` | Programming Lab (6 elective tracks) | `2311316` | VI | Track-specific |
67
+ | `pamdays.mobile` | Mobile Application Development | `2311319` | VI | `p1`–`p5` |
68
+
69
+ ### Programming Lab Electives
70
+
71
+ ```python
72
+ pamdays.programming.uiux # 2301314A - UI/UX Design (p1-p4)
73
+ pamdays.programming.nnfl # 2311314B - Neural Network and Fuzzy Logic (p1-p4)
74
+ pamdays.programming.webtech # 2311314C - Web Technology (p1-p4)
75
+ pamdays.programming.cloud # 2301315A - Cloud Computing (p1-p4)
76
+ pamdays.programming.nlp # 2301315B - Natural Language Processing (p1-p5)
77
+ pamdays.programming.cybersecurity # 2311315C - Cyber Security (p1-p4)
78
+ ```
79
+
80
+ ---
81
+
82
+ ## Concept Aliases & Alternatives
83
+
84
+ Concept aliases point to the exact practical object:
85
+
86
+ ```python
87
+ pamdays.aidsbd.astar is pamdays.aidsbd.p1 # True
88
+ pamdays.aidsbd.minimax is pamdays.aidsbd.p2 # True
89
+ pamdays.programming.nlp.tokenization is pamdays.programming.nlp.p1 # True
90
+ ```
91
+
92
+ Where an official practical contains multiple problems or OR-alternatives, official numbering is preserved and alternatives are exposed as child attributes:
93
+
94
+ ```python
95
+ pamdays.aidsbd.p4.nqueens
96
+ pamdays.aidsbd.p4.graphcoloring
97
+ pamdays.aidsbd.p4.sudoku
98
+
99
+ pamdays.aidsbd.p9.linear
100
+ pamdays.aidsbd.p9.logistic
101
+
102
+ pamdays.aidsbd.p10.svm
103
+ pamdays.aidsbd.p10.knn
104
+
105
+ pamdays.dstt.p2.httpstatus
106
+ pamdays.dstt.p2.tophosts
107
+ pamdays.dstt.p2.endpoints
108
+ pamdays.dstt.p2.errors404
109
+ ```
110
+
111
+ ---
112
+
113
+ ## Listing & Searching
114
+
115
+ ```python
116
+ pamdays.aidsbd.list()
117
+ pamdays.aidsbd.list(detailed=True)
118
+ pamdays.aidsbd.get(1)
119
+ pamdays.aidsbd.get("astar")
120
+
121
+ pamdays.search("minimax")
122
+ pamdays.search("linear regression")
123
+ ```
124
+
125
+ ---
126
+
127
+ ## Known Limitations (Non-Python Assignments)
128
+
129
+ Several curriculum practicals are not Python programs—for example, Hadoop study notes (`dstt.p1`), Tableau/Power BI GUI workflows (`dstt.p4`–`p8`), UI/UX Figma design (`programming.uiux`), HTML/JS/Express (`programming.webtech`), CloudSim/KVM/Apex (`programming.cloud`), security audit/ZAP labs (`programming.cybersecurity.p3`–`p4`), and Flutter/Android Studio projects (`mobile.p1`–`p5`).
130
+
131
+ For these entries:
132
+ - `print(practical)` prints clean instructions, checklists, or target-language code (Dart, HTML, JS, Java, Apex).
133
+ - `.run()` does not pretend to execute them in Python; it clearly informs the user why and displays the relevant workflow instructions.
134
+
135
+ ---
136
+
137
+ ## Contributing a New Practical
138
+
139
+ 1. Add a module `p<N>.py` inside the target subject folder under `src/pamdays/<subject>/`.
140
+ 2. Instantiate `Practical(...)` and register it with `register("<subject>", practical, aliases=[...])`.
141
+ 3. Import and expose `p<N>` and its concept alias(es) in the subject's `__init__.py`.
142
+ 4. Add unit tests in `tests/` and run `pytest`.
@@ -0,0 +1,29 @@
1
+ [build-system]
2
+ requires = ['setuptools>=61', 'wheel']
3
+ build-backend = 'setuptools.build_meta'
4
+
5
+ [project]
6
+ name = 'pamdays'
7
+ version = '0.1.0'
8
+ description = 'Subject-wise practical-code library for TY B.Tech AI & DS students'
9
+ readme = 'README.md'
10
+ license = { text = 'MIT' }
11
+ requires-python = '>=3.9'
12
+ authors = [{ name = 'Soham' }]
13
+ keywords = ['education', 'practical', 'AI', 'data science', 'KKWIEER']
14
+ classifiers = [
15
+ 'Programming Language :: Python :: 3',
16
+ 'License :: OSI Approved :: MIT License',
17
+ 'Intended Audience :: Education',
18
+ 'Operating System :: OS Independent',
19
+ ]
20
+
21
+ [project.optional-dependencies]
22
+ ds = ['numpy', 'pandas', 'matplotlib', 'scikit-learn']
23
+ nlp = ['nltk', 'gensim']
24
+ nn = ['tensorflow']
25
+ spark = ['pyspark']
26
+ all = ['numpy', 'pandas', 'matplotlib', 'scikit-learn', 'nltk', 'gensim']
27
+
28
+ [tool.setuptools.packages.find]
29
+ where = ['src']
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,55 @@
1
+ """
2
+ pamdays
3
+ ~~~~~~~
4
+ Subject-wise practical-code library for TY B.Tech AI & DS students.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from pamdays import aidsbd, dstt, mobile, programming
10
+ from pamdays.registry import REGISTRY
11
+ from pamdays.search import search
12
+
13
+ __version__ = "0.1.0"
14
+ __all__ = [
15
+ "aidsbd",
16
+ "dstt",
17
+ "programming",
18
+ "mobile",
19
+ "search",
20
+ "subjects",
21
+ "REGISTRY",
22
+ ]
23
+
24
+
25
+ def subjects():
26
+ """Return metadata for all available curriculum subjects."""
27
+ return [
28
+ {
29
+ "alias": "aidsbd",
30
+ "title": "Artificial Intelligence & Data Science and Big Data Lab",
31
+ "code": "2311304",
32
+ "alt_code": "2301304",
33
+ "semester": "V",
34
+ "notes": "Listed as Semester V in curriculum (course code 2301304 on p.1, 2311304 on p.9).",
35
+ },
36
+ {
37
+ "alias": "dstt",
38
+ "title": "Data Science Techniques and Tools Lab",
39
+ "code": "2311313",
40
+ "semester": "VI",
41
+ },
42
+ {
43
+ "alias": "programming",
44
+ "title": "Programming Lab",
45
+ "code": "2311316",
46
+ "semester": "VI",
47
+ "electives": ["uiux", "nnfl", "webtech", "cloud", "nlp", "cybersecurity"],
48
+ },
49
+ {
50
+ "alias": "mobile",
51
+ "title": "Mobile Application Development",
52
+ "code": "2311319",
53
+ "semester": "VI",
54
+ },
55
+ ]
@@ -0,0 +1,72 @@
1
+ """
2
+ pamdays.aidsbd
3
+ ~~~~~~~~~~~~~~
4
+ Artificial Intelligence & Data Science and Big Data Lab | Sem V | 2311304 (2301304 on p.1)
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from pamdays.aidsbd import (
10
+ p1 as _p1,
11
+ p2 as _p2,
12
+ p3 as _p3,
13
+ p4 as _p4,
14
+ p5 as _p5,
15
+ p6 as _p6,
16
+ p7 as _p7,
17
+ p8 as _p8,
18
+ p9 as _p9,
19
+ p10 as _p10,
20
+ p11 as _p11,
21
+ )
22
+ from pamdays.display import print_subject_list
23
+ from pamdays.registry import get_practical
24
+
25
+ p1 = _p1.practical
26
+ p2 = _p2.practical
27
+ p3 = _p3.practical
28
+ p4 = _p4.practical
29
+ p5 = _p5.practical
30
+ p6 = _p6.practical
31
+ p7 = _p7.practical
32
+ p8 = _p8.practical
33
+ p9 = _p9.practical
34
+ p10 = _p10.practical
35
+ p11 = _p11.practical
36
+
37
+ # Concept aliases (point directly to the Practical objects)
38
+ astar = p1
39
+ minimax = p2
40
+ alphabeta = p3
41
+ csp = p4
42
+ nqueens = p4.nqueens
43
+ graphcoloring = p4.graphcoloring
44
+ sudoku = p4.sudoku
45
+ chatbot = p5
46
+ expertsystem = p6
47
+ datapreprocessing = p7
48
+ pca = p8
49
+ regression = p9
50
+ linearregression = p9.linear
51
+ logisticregression = p9.logistic
52
+ classification = p10
53
+ svm = p10.svm
54
+ spam = p10.svm
55
+ knn = p10.knn
56
+ kmeans = p11
57
+
58
+ _ALL = [p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11]
59
+
60
+
61
+ def list(detailed: bool = False) -> None: # noqa: A001
62
+ """List all practicals in AI & DSBD Lab."""
63
+ print_subject_list(
64
+ "Artificial Intelligence & Data Science and Big Data Lab (aidsbd) | Sem V | 2311304",
65
+ _ALL,
66
+ detailed=detailed,
67
+ )
68
+
69
+
70
+ def get(key):
71
+ """Return a Practical by number (int) or alias (str)."""
72
+ return get_practical("aidsbd", key)
@@ -0,0 +1,80 @@
1
+ """pamdays.aidsbd.p1 - A* Search Algorithm"""
2
+
3
+ from pamdays.core import Practical
4
+ from pamdays.registry import register
5
+
6
+ _CODE = '''\
7
+ import heapq
8
+
9
+ n = int(input("Enter grid size (e.g. 5): "))
10
+ grid = [[0] * n for _ in range(n)]
11
+ obs = int(input("Number of obstacles: "))
12
+ for _ in range(obs):
13
+ r, c = map(int, input("Obstacle row col: ").split())
14
+ grid[r][c] = 1
15
+
16
+ sr, sc = map(int, input("Start row col: ").split())
17
+ gr, gc = map(int, input("Goal row col: ").split())
18
+ start, goal = (sr, sc), (gr, gc)
19
+
20
+ def h(a, b):
21
+ return abs(a[0] - b[0]) + abs(a[1] - b[1])
22
+
23
+ open_heap = [(h(start, goal), 0, start)]
24
+ came_from = {}
25
+ g_score = {start: 0}
26
+ closed = set()
27
+
28
+ while open_heap:
29
+ _, g, cur = heapq.heappop(open_heap)
30
+ if cur == goal:
31
+ path = []
32
+ while cur in came_from:
33
+ path.append(cur)
34
+ cur = came_from[cur]
35
+ path.append(start)
36
+ print("Shortest Path:", " -> ".join(map(str, path[::-1])))
37
+ break
38
+ if cur in closed:
39
+ continue
40
+ closed.add(cur)
41
+ for dr, dc in [(-1, 0), (1, 0), (0, -1), (0, 1)]:
42
+ nr, nc = cur[0] + dr, cur[1] + dc
43
+ nxt = (nr, nc)
44
+ if 0 <= nr < n and 0 <= nc < n and grid[nr][nc] == 0:
45
+ ng = g + 1
46
+ if ng < g_score.get(nxt, float("inf")):
47
+ g_score[nxt] = ng
48
+ came_from[nxt] = cur
49
+ heapq.heappush(open_heap, (ng + h(nxt, goal), ng, nxt))
50
+ else:
51
+ print("No path found.")
52
+ '''
53
+
54
+ practical = register(
55
+ "aidsbd",
56
+ Practical(
57
+ number=1,
58
+ title="Implement A star (A*) Algorithm for any game search problem",
59
+ concept="astar",
60
+ subject="aidsbd",
61
+ language="python",
62
+ runnable=True,
63
+ aim="Implement the A* search algorithm to find the shortest path on a grid with obstacles.",
64
+ problem_statement="Implement A star (A*) Algorithm for any game search problem.",
65
+ algorithm=[
66
+ "Read grid size, obstacle coordinates, start state, and goal state.",
67
+ "Initialize the open priority queue with start node where f(n) = g(n) + h(n) using Manhattan distance.",
68
+ "Pop the node with the lowest f-score from the open queue.",
69
+ "If the popped node is the goal, reconstruct and print the path.",
70
+ "Otherwise expand valid 4-directional neighbours, update g-scores if a cheaper path is found, and push to open queue.",
71
+ "Repeat until goal is reached or open queue is empty.",
72
+ ],
73
+ code=_CODE,
74
+ sample_input="5\n2\n1 1\n2 2\n0 0\n4 4",
75
+ sample_output="Shortest Path: (0, 0) -> (0, 1) -> (0, 2) -> (0, 3) -> (0, 4) -> (1, 4) -> (2, 4) -> (3, 4) -> (4, 4)",
76
+ time_complexity="O(b^d) worst case (depends on heuristic quality; O(N^2 log N) on an N x N grid).",
77
+ space_complexity="O(b^d) to store open and closed states (O(N^2) on an N x N grid).",
78
+ notes="Uses 4-directional movement and Manhattan distance heuristic on an N x N grid.",
79
+ ),
80
+ )