test-graph2 0.1.0__tar.gz → 0.2.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.
- test_graph2-0.2.0/PKG-INFO +51 -0
- test_graph2-0.2.0/README.md +40 -0
- {test_graph2-0.1.0 → test_graph2-0.2.0}/pyproject.toml +2 -2
- {test_graph2-0.1.0 → test_graph2-0.2.0}/setup.py +2 -2
- test_graph2-0.2.0/test_graph2.egg-info/PKG-INFO +51 -0
- {test_graph2-0.1.0 → test_graph2-0.2.0}/test_graph2.egg-info/SOURCES.txt +9 -0
- test_graph2-0.2.0/test_mod/cli.py +49 -0
- test_graph2-0.2.0/test_mod/files/PR01(Column).py +21 -0
- test_graph2-0.2.0/test_mod/files/PR01(Railfence).py +13 -0
- test_graph2-0.2.0/test_mod/files/PR01(ceaser).py +28 -0
- test_graph2-0.2.0/test_mod/files/PR01(monoalphabetic).py +25 -0
- test_graph2-0.2.0/test_mod/files/PR02(ImpRSA).py +35 -0
- test_graph2-0.2.0/test_mod/files/PR02(RSA).py +11 -0
- test_graph2-0.2.0/test_mod/files/PR03(HMAC).py +21 -0
- test_graph2-0.2.0/test_mod/files/PR04(DigitalSign).py +29 -0
- test_graph2-0.2.0/test_mod/files/PR05(Diffie).py +17 -0
- test_graph2-0.1.0/PKG-INFO +0 -27
- test_graph2-0.1.0/README.md +0 -16
- test_graph2-0.1.0/test_graph2.egg-info/PKG-INFO +0 -27
- test_graph2-0.1.0/test_mod/cli.py +0 -30
- {test_graph2-0.1.0 → test_graph2-0.2.0}/setup.cfg +0 -0
- {test_graph2-0.1.0 → test_graph2-0.2.0}/test_graph2.egg-info/dependency_links.txt +0 -0
- {test_graph2-0.1.0 → test_graph2-0.2.0}/test_graph2.egg-info/entry_points.txt +0 -0
- {test_graph2-0.1.0 → test_graph2-0.2.0}/test_graph2.egg-info/requires.txt +0 -0
- {test_graph2-0.1.0 → test_graph2-0.2.0}/test_graph2.egg-info/top_level.txt +0 -0
- {test_graph2-0.1.0 → test_graph2-0.2.0}/test_mod/__init__.py +0 -0
- {test_graph2-0.1.0 → test_graph2-0.2.0}/test_mod/__main__.py +0 -0
- {test_graph2-0.1.0 → test_graph2-0.2.0}/test_mod/files/PR01(BFS).py +0 -0
- {test_graph2-0.1.0 → test_graph2-0.2.0}/test_mod/files/PR01(IDFS).py +0 -0
- {test_graph2-0.1.0 → test_graph2-0.2.0}/test_mod/files/PR02(A star).py +0 -0
- {test_graph2-0.1.0 → test_graph2-0.2.0}/test_mod/files/PR05(Adaboost).py +0 -0
- {test_graph2-0.1.0 → test_graph2-0.2.0}/test_mod/files/PR07(KNN).py +0 -0
- {test_graph2-0.1.0 → test_graph2-0.2.0}/test_mod/files/PR08(SVM).py +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: test-graph2
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: AI, ML and Cryptography practical codes
|
|
5
|
+
Author: Aquif Shaikh
|
|
6
|
+
Requires-Python: >=3.8
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Requires-Dist: scikit-learn
|
|
9
|
+
Requires-Dist: matplotlib
|
|
10
|
+
Requires-Dist: numpy
|
|
11
|
+
|
|
12
|
+
# test-graph2
|
|
13
|
+
|
|
14
|
+
All AI, ML & Cryptography practical codes in one package.
|
|
15
|
+
|
|
16
|
+
### Available Practicals:
|
|
17
|
+
* **AI / ML:**
|
|
18
|
+
- `PR01(BFS).py`
|
|
19
|
+
- `PR01(IDFS).py`
|
|
20
|
+
- `PR02(A star).py`
|
|
21
|
+
- `PR05(Adaboost).py`
|
|
22
|
+
- `PR07(KNN).py`
|
|
23
|
+
- `PR08(SVM).py`
|
|
24
|
+
* **Cryptography & Information Security (CIS):**
|
|
25
|
+
- `PR01(ceaser).py`
|
|
26
|
+
- `PR01(Column).py`
|
|
27
|
+
- `PR01(monoalphabetic).py`
|
|
28
|
+
- `PR01(Railfence).py`
|
|
29
|
+
- `PR02(ImpRSA).py`
|
|
30
|
+
- `PR02(RSA).py`
|
|
31
|
+
- `PR03(HMAC).py`
|
|
32
|
+
- `PR04(DigitalSign).py`
|
|
33
|
+
- `PR05(Diffie).py`
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
### 1. Extract ALL practical files:
|
|
40
|
+
```bash
|
|
41
|
+
get-practicals
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 2. Extract ONLY a specific practical:
|
|
45
|
+
```bash
|
|
46
|
+
get-practicals BFS
|
|
47
|
+
get-practicals Diffie
|
|
48
|
+
get-practicals RSA
|
|
49
|
+
get-practicals ceaser
|
|
50
|
+
get-practicals KNN
|
|
51
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# test-graph2
|
|
2
|
+
|
|
3
|
+
All AI, ML & Cryptography practical codes in one package.
|
|
4
|
+
|
|
5
|
+
### Available Practicals:
|
|
6
|
+
* **AI / ML:**
|
|
7
|
+
- `PR01(BFS).py`
|
|
8
|
+
- `PR01(IDFS).py`
|
|
9
|
+
- `PR02(A star).py`
|
|
10
|
+
- `PR05(Adaboost).py`
|
|
11
|
+
- `PR07(KNN).py`
|
|
12
|
+
- `PR08(SVM).py`
|
|
13
|
+
* **Cryptography & Information Security (CIS):**
|
|
14
|
+
- `PR01(ceaser).py`
|
|
15
|
+
- `PR01(Column).py`
|
|
16
|
+
- `PR01(monoalphabetic).py`
|
|
17
|
+
- `PR01(Railfence).py`
|
|
18
|
+
- `PR02(ImpRSA).py`
|
|
19
|
+
- `PR02(RSA).py`
|
|
20
|
+
- `PR03(HMAC).py`
|
|
21
|
+
- `PR04(DigitalSign).py`
|
|
22
|
+
- `PR05(Diffie).py`
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
### 1. Extract ALL practical files:
|
|
29
|
+
```bash
|
|
30
|
+
get-practicals
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 2. Extract ONLY a specific practical:
|
|
34
|
+
```bash
|
|
35
|
+
get-practicals BFS
|
|
36
|
+
get-practicals Diffie
|
|
37
|
+
get-practicals RSA
|
|
38
|
+
get-practicals ceaser
|
|
39
|
+
get-practicals KNN
|
|
40
|
+
```
|
|
@@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "test-graph2"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.2.0"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="Aquif Shaikh" },
|
|
10
10
|
]
|
|
11
|
-
description = "AI and
|
|
11
|
+
description = "AI, ML and Cryptography practical codes"
|
|
12
12
|
readme = "README.md"
|
|
13
13
|
requires-python = ">=3.8"
|
|
14
14
|
dependencies = [
|
|
@@ -2,9 +2,9 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="test-graph2",
|
|
5
|
-
version="0.
|
|
5
|
+
version="0.2.0",
|
|
6
6
|
author="Aquif Shaikh",
|
|
7
|
-
description="AI and
|
|
7
|
+
description="AI, ML and Cryptography practical codes",
|
|
8
8
|
packages=find_packages(),
|
|
9
9
|
package_data={
|
|
10
10
|
"test_mod": ["files/*.py"],
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: test-graph2
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: AI, ML and Cryptography practical codes
|
|
5
|
+
Author: Aquif Shaikh
|
|
6
|
+
Requires-Python: >=3.8
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Requires-Dist: scikit-learn
|
|
9
|
+
Requires-Dist: matplotlib
|
|
10
|
+
Requires-Dist: numpy
|
|
11
|
+
|
|
12
|
+
# test-graph2
|
|
13
|
+
|
|
14
|
+
All AI, ML & Cryptography practical codes in one package.
|
|
15
|
+
|
|
16
|
+
### Available Practicals:
|
|
17
|
+
* **AI / ML:**
|
|
18
|
+
- `PR01(BFS).py`
|
|
19
|
+
- `PR01(IDFS).py`
|
|
20
|
+
- `PR02(A star).py`
|
|
21
|
+
- `PR05(Adaboost).py`
|
|
22
|
+
- `PR07(KNN).py`
|
|
23
|
+
- `PR08(SVM).py`
|
|
24
|
+
* **Cryptography & Information Security (CIS):**
|
|
25
|
+
- `PR01(ceaser).py`
|
|
26
|
+
- `PR01(Column).py`
|
|
27
|
+
- `PR01(monoalphabetic).py`
|
|
28
|
+
- `PR01(Railfence).py`
|
|
29
|
+
- `PR02(ImpRSA).py`
|
|
30
|
+
- `PR02(RSA).py`
|
|
31
|
+
- `PR03(HMAC).py`
|
|
32
|
+
- `PR04(DigitalSign).py`
|
|
33
|
+
- `PR05(Diffie).py`
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
### 1. Extract ALL practical files:
|
|
40
|
+
```bash
|
|
41
|
+
get-practicals
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 2. Extract ONLY a specific practical:
|
|
45
|
+
```bash
|
|
46
|
+
get-practicals BFS
|
|
47
|
+
get-practicals Diffie
|
|
48
|
+
get-practicals RSA
|
|
49
|
+
get-practicals ceaser
|
|
50
|
+
get-practicals KNN
|
|
51
|
+
```
|
|
@@ -11,8 +11,17 @@ test_mod/__init__.py
|
|
|
11
11
|
test_mod/__main__.py
|
|
12
12
|
test_mod/cli.py
|
|
13
13
|
test_mod/files/PR01(BFS).py
|
|
14
|
+
test_mod/files/PR01(Column).py
|
|
14
15
|
test_mod/files/PR01(IDFS).py
|
|
16
|
+
test_mod/files/PR01(Railfence).py
|
|
17
|
+
test_mod/files/PR01(ceaser).py
|
|
18
|
+
test_mod/files/PR01(monoalphabetic).py
|
|
15
19
|
test_mod/files/PR02(A star).py
|
|
20
|
+
test_mod/files/PR02(ImpRSA).py
|
|
21
|
+
test_mod/files/PR02(RSA).py
|
|
22
|
+
test_mod/files/PR03(HMAC).py
|
|
23
|
+
test_mod/files/PR04(DigitalSign).py
|
|
16
24
|
test_mod/files/PR05(Adaboost).py
|
|
25
|
+
test_mod/files/PR05(Diffie).py
|
|
17
26
|
test_mod/files/PR07(KNN).py
|
|
18
27
|
test_mod/files/PR08(SVM).py
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import shutil
|
|
3
|
+
import sys
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
|
|
6
|
+
def extract_files(query=None, destination=None):
|
|
7
|
+
if destination is None:
|
|
8
|
+
destination = os.getcwd()
|
|
9
|
+
|
|
10
|
+
files_dir = Path(__file__).parent / "files"
|
|
11
|
+
if not files_dir.exists():
|
|
12
|
+
print("Error: Practical files directory not found.")
|
|
13
|
+
return
|
|
14
|
+
|
|
15
|
+
all_files = list(files_dir.glob("*.py"))
|
|
16
|
+
|
|
17
|
+
# Filter files if query is provided
|
|
18
|
+
if query:
|
|
19
|
+
query_lower = query.strip().lower()
|
|
20
|
+
matched_files = [
|
|
21
|
+
f for f in all_files if query_lower in f.name.lower()
|
|
22
|
+
]
|
|
23
|
+
else:
|
|
24
|
+
matched_files = all_files
|
|
25
|
+
|
|
26
|
+
if not matched_files:
|
|
27
|
+
print(f"\n[!] No practical found matching: '{query}'")
|
|
28
|
+
print("Available files:")
|
|
29
|
+
for f in all_files:
|
|
30
|
+
print(f" - {f.name}")
|
|
31
|
+
return
|
|
32
|
+
|
|
33
|
+
print(f"\n--- Extracting Practical Files (Destination: {destination}) ---")
|
|
34
|
+
created_files = []
|
|
35
|
+
for file_path in matched_files:
|
|
36
|
+
dest_file = Path(destination) / file_path.name
|
|
37
|
+
shutil.copy2(file_path, dest_file)
|
|
38
|
+
created_files.append(file_path.name)
|
|
39
|
+
print(f" [+] Created: {file_path.name}")
|
|
40
|
+
|
|
41
|
+
print(f"\n[OK] Successfully unpacked {len(created_files)} file(s) into current directory!\n")
|
|
42
|
+
|
|
43
|
+
def main():
|
|
44
|
+
# If an argument is provided, treat it as the search keyword (e.g. 'BFS', 'Diffie', 'RSA')
|
|
45
|
+
query = sys.argv[1] if len(sys.argv) > 1 else None
|
|
46
|
+
extract_files(query=query)
|
|
47
|
+
|
|
48
|
+
if __name__ == "__main__":
|
|
49
|
+
main()
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
plaintext = input("Enter plain Text: ").replace(" ","").upper()
|
|
2
|
+
key = input("Enter Key:").upper()
|
|
3
|
+
|
|
4
|
+
col = len(key)
|
|
5
|
+
while len(plaintext) % col != 0:
|
|
6
|
+
plaintext += "X"
|
|
7
|
+
|
|
8
|
+
rows = len(plaintext) // col
|
|
9
|
+
|
|
10
|
+
print("\nMatrix:")
|
|
11
|
+
for i in range(rows):
|
|
12
|
+
print(plaintext[i*col:(i+1)*col])
|
|
13
|
+
|
|
14
|
+
ciphertext = ""
|
|
15
|
+
|
|
16
|
+
for ch in sorted(key):
|
|
17
|
+
index = key.index(ch)
|
|
18
|
+
for i in range(rows):
|
|
19
|
+
ciphertext += plaintext[i*col+index]
|
|
20
|
+
|
|
21
|
+
print("\nCipher Text: ",ciphertext)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
string = input("Enter a string: ")
|
|
2
|
+
|
|
3
|
+
def Railfence(text):
|
|
4
|
+
result = ""
|
|
5
|
+
for i in range(len(text)):
|
|
6
|
+
if i % 2 == 0:
|
|
7
|
+
result += text[i]
|
|
8
|
+
for i in range(len(text)):
|
|
9
|
+
if i % 2 != 0:
|
|
10
|
+
result += text[i]
|
|
11
|
+
return result
|
|
12
|
+
|
|
13
|
+
print("Ciphertext:", Railfence(string))
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
text = input("Enter the text: ")
|
|
2
|
+
key = int(input("Enter the key: "))
|
|
3
|
+
|
|
4
|
+
encrypted = ""
|
|
5
|
+
|
|
6
|
+
for ch in text:
|
|
7
|
+
if ch.isalpha():
|
|
8
|
+
if ch.isupper():
|
|
9
|
+
encrypted += chr((ord(ch) - ord('A') + key) % 26 + ord('A'))
|
|
10
|
+
else:
|
|
11
|
+
encrypted += chr((ord(ch) - ord('a') + key) % 26 + ord('a'))
|
|
12
|
+
else:
|
|
13
|
+
encrypted += ch
|
|
14
|
+
|
|
15
|
+
print("Encrypted Text:", encrypted)
|
|
16
|
+
|
|
17
|
+
decrypted = ""
|
|
18
|
+
|
|
19
|
+
for ch in encrypted:
|
|
20
|
+
if ch.isalpha():
|
|
21
|
+
if ch.isupper():
|
|
22
|
+
decrypted += chr((ord(ch) - ord('A') - key) % 26 + ord('A'))
|
|
23
|
+
else:
|
|
24
|
+
decrypted += chr((ord(ch) - ord('a') - key) % 26 + ord('a'))
|
|
25
|
+
else:
|
|
26
|
+
decrypted += ch
|
|
27
|
+
|
|
28
|
+
print("Decrypted Text:", decrypted)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
2
|
+
key = "QAZWSXEDCRFVTGBYHNUJMIKLOP"
|
|
3
|
+
|
|
4
|
+
plaintext = input("Enter plaintext: ").upper()
|
|
5
|
+
ciphertext = ""
|
|
6
|
+
|
|
7
|
+
for ch in plaintext:
|
|
8
|
+
if ch in alphabet:
|
|
9
|
+
index = alphabet.index(ch)
|
|
10
|
+
ciphertext += key[index]
|
|
11
|
+
else:
|
|
12
|
+
ciphertext += ch
|
|
13
|
+
|
|
14
|
+
print("Ciphertext:", ciphertext)
|
|
15
|
+
|
|
16
|
+
decrypted = ""
|
|
17
|
+
|
|
18
|
+
for ch in ciphertext:
|
|
19
|
+
if ch in key:
|
|
20
|
+
index = key.index(ch)
|
|
21
|
+
decrypted += alphabet[index]
|
|
22
|
+
else:
|
|
23
|
+
decrypted += ch
|
|
24
|
+
|
|
25
|
+
print("Decrypted text:", decrypted)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import math
|
|
2
|
+
|
|
3
|
+
def gcd(a, h):
|
|
4
|
+
temp = 0
|
|
5
|
+
while(1):
|
|
6
|
+
temp = a % h
|
|
7
|
+
if (temp == 0):
|
|
8
|
+
return h
|
|
9
|
+
a = h
|
|
10
|
+
h = temp
|
|
11
|
+
|
|
12
|
+
p = 3
|
|
13
|
+
q = 7
|
|
14
|
+
|
|
15
|
+
n = p * q
|
|
16
|
+
phi = (p - 1) * (q -1)
|
|
17
|
+
|
|
18
|
+
e = 2
|
|
19
|
+
|
|
20
|
+
while e < phi:
|
|
21
|
+
if gcd(e, phi) == 1:
|
|
22
|
+
break
|
|
23
|
+
e += 1
|
|
24
|
+
|
|
25
|
+
k = 2
|
|
26
|
+
d = (1 + k * phi)// e
|
|
27
|
+
|
|
28
|
+
msg = 77
|
|
29
|
+
print("Message Data:",msg)
|
|
30
|
+
|
|
31
|
+
c = pow(msg, e, n)
|
|
32
|
+
print("Encrypted Data =",c)
|
|
33
|
+
|
|
34
|
+
m = pow(c, d, n)
|
|
35
|
+
print("Original Message Sent=",m)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import rsa
|
|
2
|
+
|
|
3
|
+
publickey,privatekey = rsa.newkeys(512)
|
|
4
|
+
Message = ("Welcome To The Jungle")
|
|
5
|
+
|
|
6
|
+
encMessage = rsa.encrypt(Message.encode().publickey)
|
|
7
|
+
print("Original String : ", Message)
|
|
8
|
+
print("Encrypted String : ", encMessage)
|
|
9
|
+
|
|
10
|
+
decMessage = rsa.decrypt(encMessage,privatekey).decode()
|
|
11
|
+
print("Decrypt String : ",decMessage)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import hmac
|
|
2
|
+
|
|
3
|
+
import hashlib
|
|
4
|
+
|
|
5
|
+
key = b"Secret Key"
|
|
6
|
+
message = b"Hello, Receiver!"
|
|
7
|
+
mac = hmac.new(key, message, hashlib.sha256).hexdigest()
|
|
8
|
+
|
|
9
|
+
print("Original Message:", message.decode())
|
|
10
|
+
print("Generated Mac:",mac)
|
|
11
|
+
|
|
12
|
+
received_message = b"Hello, Receiver!"
|
|
13
|
+
received_mac = mac
|
|
14
|
+
|
|
15
|
+
computed_mac = hmac.new(key, received_message, hashlib.sha256).hexdigest()
|
|
16
|
+
print("Computed_Mac:",computed_mac)
|
|
17
|
+
|
|
18
|
+
if hmac.compare_digest(received_mac, computed_mac):
|
|
19
|
+
print("Verification Successful")
|
|
20
|
+
else:
|
|
21
|
+
print("Verification Failed")
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from Crypto.PublicKey import RSA
|
|
2
|
+
from Crypto.Signature import pkcs1_15
|
|
3
|
+
from Crypto.Hash import SHA256
|
|
4
|
+
|
|
5
|
+
#Generate RSA Key Pair
|
|
6
|
+
|
|
7
|
+
key = RSA.generate(2048)
|
|
8
|
+
private_key = key
|
|
9
|
+
public_key = key.publickey()
|
|
10
|
+
|
|
11
|
+
#input Message
|
|
12
|
+
|
|
13
|
+
message = input("Enter Message :")
|
|
14
|
+
hash_value = SHA256.new(message.encode())
|
|
15
|
+
|
|
16
|
+
#Create Digital Signature
|
|
17
|
+
|
|
18
|
+
signature = pkcs1_15.new(private_key).sign(hash_value)
|
|
19
|
+
print("\nDigital Signature Created Successfully")
|
|
20
|
+
print("Signature:", signature.hex())
|
|
21
|
+
|
|
22
|
+
#Verify Signature
|
|
23
|
+
|
|
24
|
+
try:
|
|
25
|
+
pkcs1_15.new(public_key).verify(hash_value,signature)
|
|
26
|
+
print("\nSignature Is Valid")
|
|
27
|
+
print("Message Is Authentic")
|
|
28
|
+
except(ValueError,TypeError):
|
|
29
|
+
print("\nInvalid Signature")
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
p = 7
|
|
2
|
+
g = 4
|
|
3
|
+
|
|
4
|
+
a = 3
|
|
5
|
+
b = 5
|
|
6
|
+
|
|
7
|
+
Alice =pow(g,a,p)
|
|
8
|
+
Bob =pow(g,b,p)
|
|
9
|
+
|
|
10
|
+
key1 = pow(Bob,a,p)
|
|
11
|
+
key2 = pow(Alice,a,p)
|
|
12
|
+
|
|
13
|
+
print("Alice Public Key :", Alice)
|
|
14
|
+
print("Bob Public Key :", Bob)
|
|
15
|
+
|
|
16
|
+
print("Shared key Alice :", key1)
|
|
17
|
+
print("Shared key Bob :", key2)
|
test_graph2-0.1.0/PKG-INFO
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: test-graph2
|
|
3
|
-
Version: 0.1.0
|
|
4
|
-
Summary: AI and ML practical codes
|
|
5
|
-
Author: Aquif Shaikh
|
|
6
|
-
Requires-Python: >=3.8
|
|
7
|
-
Description-Content-Type: text/markdown
|
|
8
|
-
Requires-Dist: scikit-learn
|
|
9
|
-
Requires-Dist: matplotlib
|
|
10
|
-
Requires-Dist: numpy
|
|
11
|
-
|
|
12
|
-
# test-graph2
|
|
13
|
-
|
|
14
|
-
AI & Machine Learning practical codes:
|
|
15
|
-
- `PR01(BFS).py`
|
|
16
|
-
- `PR01(IDFS).py`
|
|
17
|
-
- `PR02(A star).py`
|
|
18
|
-
- `PR05(Adaboost).py`
|
|
19
|
-
- `PR07(KNN).py`
|
|
20
|
-
- `PR08(SVM).py`
|
|
21
|
-
|
|
22
|
-
## Usage
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
pip install test-graph2
|
|
26
|
-
get-practicals
|
|
27
|
-
```
|
test_graph2-0.1.0/README.md
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# test-graph2
|
|
2
|
-
|
|
3
|
-
AI & Machine Learning practical codes:
|
|
4
|
-
- `PR01(BFS).py`
|
|
5
|
-
- `PR01(IDFS).py`
|
|
6
|
-
- `PR02(A star).py`
|
|
7
|
-
- `PR05(Adaboost).py`
|
|
8
|
-
- `PR07(KNN).py`
|
|
9
|
-
- `PR08(SVM).py`
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
pip install test-graph2
|
|
15
|
-
get-practicals
|
|
16
|
-
```
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: test-graph2
|
|
3
|
-
Version: 0.1.0
|
|
4
|
-
Summary: AI and ML practical codes
|
|
5
|
-
Author: Aquif Shaikh
|
|
6
|
-
Requires-Python: >=3.8
|
|
7
|
-
Description-Content-Type: text/markdown
|
|
8
|
-
Requires-Dist: scikit-learn
|
|
9
|
-
Requires-Dist: matplotlib
|
|
10
|
-
Requires-Dist: numpy
|
|
11
|
-
|
|
12
|
-
# test-graph2
|
|
13
|
-
|
|
14
|
-
AI & Machine Learning practical codes:
|
|
15
|
-
- `PR01(BFS).py`
|
|
16
|
-
- `PR01(IDFS).py`
|
|
17
|
-
- `PR02(A star).py`
|
|
18
|
-
- `PR05(Adaboost).py`
|
|
19
|
-
- `PR07(KNN).py`
|
|
20
|
-
- `PR08(SVM).py`
|
|
21
|
-
|
|
22
|
-
## Usage
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
pip install test-graph2
|
|
26
|
-
get-practicals
|
|
27
|
-
```
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import shutil
|
|
3
|
-
import sys
|
|
4
|
-
from pathlib import Path
|
|
5
|
-
|
|
6
|
-
def extract_files(destination=None):
|
|
7
|
-
if destination is None:
|
|
8
|
-
destination = os.getcwd()
|
|
9
|
-
|
|
10
|
-
files_dir = Path(__file__).parent / "files"
|
|
11
|
-
if not files_dir.exists():
|
|
12
|
-
print("Error: Practical files directory not found.")
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
created_files = []
|
|
16
|
-
for file_path in files_dir.glob("*.py"):
|
|
17
|
-
dest_file = Path(destination) / file_path.name
|
|
18
|
-
shutil.copy2(file_path, dest_file)
|
|
19
|
-
created_files.append(file_path.name)
|
|
20
|
-
print(f" [+] Created: {file_path.name}")
|
|
21
|
-
|
|
22
|
-
print(f"\n[OK] Successfully unpacked {len(created_files)} files into:\n {destination}\n")
|
|
23
|
-
|
|
24
|
-
def main():
|
|
25
|
-
dest = sys.argv[1] if len(sys.argv) > 1 else os.getcwd()
|
|
26
|
-
print("\n--- Extracting Practical Files ---")
|
|
27
|
-
extract_files(dest)
|
|
28
|
-
|
|
29
|
-
if __name__ == "__main__":
|
|
30
|
-
main()
|
|
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
|