junshan-kit 1.2.1__py2.py3-none-any.whl → 1.2.3__py2.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.
junshan_kit/datahub.py
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
import kagglehub
|
2
|
+
import os
|
3
|
+
import shutil
|
4
|
+
from kaggle.api.kaggle_api_extended import KaggleApi
|
5
|
+
|
6
|
+
class kaggle_data:
|
7
|
+
def list_user_datasets(self):
|
8
|
+
api = KaggleApi()
|
9
|
+
api.authenticate()
|
10
|
+
|
11
|
+
# Get the list of datasets for a specific user
|
12
|
+
datasets = api.dataset_list(user='junshan888')
|
13
|
+
|
14
|
+
print('*' * 60)
|
15
|
+
if datasets is not None:
|
16
|
+
for ds in datasets:
|
17
|
+
if ds is not None:
|
18
|
+
# Print the dataset title
|
19
|
+
print(ds.title)
|
20
|
+
print('*' * 60)
|
21
|
+
|
22
|
+
# example: list_user_datasets()
|
23
|
+
|
24
|
+
#---------------------------------------------------------------
|
25
|
+
def read_data(self, data_name = 'evpd-test', copy_path = None):
|
26
|
+
path = kagglehub.dataset_download(f'junshan888/{data_name}')
|
27
|
+
# print("Downloaded to:", path)
|
28
|
+
if copy_path is not None:
|
29
|
+
# Create target directory if it doesn't exist
|
30
|
+
os.makedirs(copy_path, exist_ok=True)
|
31
|
+
# Copy dataset to target directory
|
32
|
+
shutil.copytree(path, copy_path, dirs_exist_ok=True)
|
33
|
+
|
34
|
+
print(f"✅ Dataset has been copied to: {copy_path}/{data_name}")
|
35
|
+
|
36
|
+
# example: read_data(copy_path='./exp_data')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: junshan_kit
|
3
|
-
Version: 1.2.
|
4
|
-
Summary:
|
3
|
+
Version: 1.2.3
|
4
|
+
Summary: This is an optimization tool.
|
5
5
|
Author-email: Junshan Yin <junshanyin@163.com>
|
6
6
|
Requires-Dist: kaggle==1.7.4.5
|
7
7
|
Requires-Dist: kagglehub==0.3.13
|
@@ -9,7 +9,7 @@ Requires-Dist: numpy==2.2.6
|
|
9
9
|
Requires-Dist: scikit-learn==1.7.1
|
10
10
|
Description-Content-Type: text/markdown
|
11
11
|
|
12
|
-
|
12
|
+
We consider that \(f(x)\)
|
13
13
|
|
14
14
|
|
15
15
|
|
@@ -0,0 +1,6 @@
|
|
1
|
+
junshan_kit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
+
junshan_kit/datahub.py,sha256=bpaTK_gKcnrDWEFmWVGToYlBFGl0OJQ6pxFb0XEGm08,1218
|
3
|
+
junshan_kit/kaggle_hub.py,sha256=2YRHu8Zf6gphMUosi5njoGgIjNntk8hoCKQPmcNUfho,1092
|
4
|
+
junshan_kit-1.2.3.dist-info/METADATA,sha256=7KMYLgzzvMy-A8_Qtg344tYLriqdMF2aGELKmCjFMdo,344
|
5
|
+
junshan_kit-1.2.3.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
|
6
|
+
junshan_kit-1.2.3.dist-info/RECORD,,
|
@@ -1,5 +0,0 @@
|
|
1
|
-
junshan_kit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
junshan_kit/kaggle_hub.py,sha256=2YRHu8Zf6gphMUosi5njoGgIjNntk8hoCKQPmcNUfho,1092
|
3
|
-
junshan_kit-1.2.1.dist-info/METADATA,sha256=Fqpe4V10OILJb2DzEBd-EMiJIseVSpGxj2C64nAuVNk,303
|
4
|
-
junshan_kit-1.2.1.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
|
5
|
-
junshan_kit-1.2.1.dist-info/RECORD,,
|
File without changes
|