noshot 0.1.4__py3-none-any.whl → 0.1.6__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.
- noshot/main.py +5 -5
- noshot/utils/shell_utils.py +15 -12
- {noshot-0.1.4.dist-info → noshot-0.1.6.dist-info}/METADATA +3 -3
- {noshot-0.1.4.dist-info → noshot-0.1.6.dist-info}/RECORD +7 -7
- {noshot-0.1.4.dist-info → noshot-0.1.6.dist-info}/LICENSE.txt +0 -0
- {noshot-0.1.4.dist-info → noshot-0.1.6.dist-info}/WHEEL +0 -0
- {noshot-0.1.4.dist-info → noshot-0.1.6.dist-info}/top_level.txt +0 -0
noshot/main.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
from .utils.shell_utils import get_folder
|
2
|
-
from .utils.shell_utils import get_file
|
3
|
-
from .utils.shell_utils import remove_folder
|
1
|
+
from noshot.utils.shell_utils import get_folder
|
2
|
+
from noshot.utils.shell_utils import get_file
|
3
|
+
from noshot.utils.shell_utils import remove_folder
|
4
4
|
|
5
5
|
available = {'-1 ' : "ML TS XAI(Folder)",
|
6
6
|
'0 ' : "Remove Folder"}
|
@@ -9,8 +9,8 @@ def get(name = None, open = False):
|
|
9
9
|
try:
|
10
10
|
if name is not None:
|
11
11
|
name = str(name)
|
12
|
-
if name in ['-1']
|
13
|
-
elif name in ['0']
|
12
|
+
if name in ['-1'] : get_folder("ML TS XAI", loc = True)
|
13
|
+
elif name in ['0'] : remove_folder("ML TS XAI")
|
14
14
|
else:
|
15
15
|
for k, v in available.items():
|
16
16
|
sep = " : " if v else ""
|
noshot/utils/shell_utils.py
CHANGED
@@ -3,8 +3,8 @@ import shutil
|
|
3
3
|
import subprocess
|
4
4
|
import pathlib
|
5
5
|
|
6
|
-
def get_folder(folder_path
|
7
|
-
src = os.path.join(os.path.
|
6
|
+
def get_folder(folder_path, loc = False):
|
7
|
+
src = os.path.join(os.path.dirname(os.path.dirname(__file__)), "data", pathlib.Path(folder_path))
|
8
8
|
try:
|
9
9
|
dest = os.path.join(os.getcwd(), pathlib.Path(folder_path))
|
10
10
|
shutil.copytree(src, dest, symlinks=False, copy_function = shutil.copy2,
|
@@ -24,7 +24,7 @@ def get_folder(folder_path = "ML TS XAI", loc = False):
|
|
24
24
|
print("Path:",dest)
|
25
25
|
|
26
26
|
def get_file(file_path, loc = False, open = False):
|
27
|
-
src = os.path.
|
27
|
+
src = os.path.join(os.path.dirname(os.path.dirname(__file__)), "data", pathlib.Path(file_path))
|
28
28
|
try:
|
29
29
|
dest = os.path.join(os.getcwd(), pathlib.Path(file_path).name)
|
30
30
|
shutil.copy(src, dest)
|
@@ -40,15 +40,18 @@ def get_file(file_path, loc = False, open = False):
|
|
40
40
|
if loc:
|
41
41
|
print("Path:",dest)
|
42
42
|
|
43
|
-
def remove_folder(folder_path
|
43
|
+
def remove_folder(folder_path):
|
44
44
|
try:
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
45
|
+
src1 = os.path.join(os.getcwd(), pathlib.Path(folder_path))
|
46
|
+
src2 = os.path.join(os.path.expanduser('~'), "Downloads", pathlib.Path(folder_path))
|
47
|
+
if os.path.exists(src1) or os.path.exists(src2):
|
48
|
+
shutil.rmtree(src1, ignore_errors = True)
|
49
|
+
shutil.rmtree(src2, ignore_errors = True)
|
50
|
+
if os.path.exists(src1) or os.path.exists(src2):
|
51
|
+
print("Deletion Impossible [File Not Closed - Shutdown File Kernel]\nGo to Home page -> Running Tab -> Click Shut Down All")
|
52
|
+
else:
|
53
|
+
print(f"Folder({pathlib.Path(folder_path)}) Removed Successfully")
|
54
|
+
else:
|
55
|
+
print(f"Folder({pathlib.Path(folder_path)}) Not Found [Repeated Iteration | Probably Removed Manually]")
|
53
56
|
except Exception as error:
|
54
57
|
print(error)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: noshot
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.6
|
4
4
|
Summary: Support library for Artificial Intelligence, Machine Learning and Data Science tools
|
5
5
|
Author: Tim Stan S
|
6
6
|
License: MIT
|
@@ -32,7 +32,7 @@ Dynamic: summary
|
|
32
32
|

|
33
33
|
[](https://pypi.org/project/noshot)
|
34
34
|
[](https://github.com/suganthangnanavelan/one-shot-coding/blob/main/LICENSE.txt)
|
35
|
-
[](https://
|
35
|
+
[](https://pepy.tech/projects/noshot)
|
36
36
|

|
37
37
|

|
38
38
|
|
@@ -52,4 +52,4 @@ Dynamic: summary
|
|
52
52
|
## 📦 **Installation**
|
53
53
|
Install latest version via `pip`:
|
54
54
|
```sh
|
55
|
-
pip install noshot==0.1.
|
55
|
+
pip install noshot==0.1.6
|
@@ -1,5 +1,5 @@
|
|
1
1
|
noshot/__init__.py,sha256=000R40tii8lDFU8C1fBaD3SOnxD0PWRNWZU-km49YrU,21
|
2
|
-
noshot/main.py,sha256=
|
2
|
+
noshot/main.py,sha256=zXegIqjJPARlPnQMS-B2dAENcvyaZkNwmue63Gm8lHU,663
|
3
3
|
noshot/data/ML TS XAI/Ubuntu CN Lab.iso,sha256=CkoX_H3nGO6EqfK3Qa62mt_vYNpmMOzKU0oCcBJQ41M,4589568
|
4
4
|
noshot/data/ML TS XAI/AIDS/1. Implement Basic Search Strategies/(A) Breadth First Search.ipynb,sha256=Xde_I0zbFZb4SmiAYDzH7ft6JBFBvGkpv48X2I_LGiQ,3548
|
5
5
|
noshot/data/ML TS XAI/AIDS/1. Implement Basic Search Strategies/(B) Depth First Search.ipynb,sha256=pfZ8D_bQiqxt_qLoWlQjwK8mbblh053AupAwxyyEhrM,3535
|
@@ -208,9 +208,9 @@ noshot/data/ML TS XAI/NLP/NLP 6/4. Hinddle and Rooth.ipynb,sha256=E5TYdhHCAOlUIV
|
|
208
208
|
noshot/data/ML TS XAI/NLP/NLP 6/7. PCFG using CYK.ipynb,sha256=gOb9b8dUslegyuGVXjm4BB9XSKFgIME-ZfkjFrUhoAk,8735
|
209
209
|
noshot/data/ML TS XAI/NLP/NLP 6/8. BOW and TF-IDF.ipynb,sha256=xgey9ML4zdVWOEg8wkEuWsM20Pz1-amMzcIt7IH9RFs,11133
|
210
210
|
noshot/utils/__init__.py,sha256=QVrN1ZpzPXxZqDOqot5-t_ulFjZXVx7Cvr-Is9AK0po,110
|
211
|
-
noshot/utils/shell_utils.py,sha256
|
212
|
-
noshot-0.1.
|
213
|
-
noshot-0.1.
|
214
|
-
noshot-0.1.
|
215
|
-
noshot-0.1.
|
216
|
-
noshot-0.1.
|
211
|
+
noshot/utils/shell_utils.py,sha256=-XfgYlNQlULa_rRJ3vsfTns4m_jiueGEj396J_y0Gus,2611
|
212
|
+
noshot-0.1.6.dist-info/LICENSE.txt,sha256=fgCruaVm5cUjFGOeEoGIimT6nnUunBqcNZHpGzK8TSw,1086
|
213
|
+
noshot-0.1.6.dist-info/METADATA,sha256=ErAGbpdyQe4Fvw6kBkQ1C-jTaO8LCUgicPwbaaDUvIw,2453
|
214
|
+
noshot-0.1.6.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
215
|
+
noshot-0.1.6.dist-info/top_level.txt,sha256=UL-c0HffdRwohz-y9icY_rnY48pQDdxGcBsgyCKh2Q8,7
|
216
|
+
noshot-0.1.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|