junshan-kit 1.1.3__py2.py3-none-any.whl → 1.1.5__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/kaggle_hub.py CHANGED
@@ -1,6 +1,7 @@
1
1
  import kagglehub
2
2
  import os
3
3
  import shutil
4
+ from kaggle.api.kaggle_api_extended import KaggleApi
4
5
 
5
6
  def read_data(data_name = 'evpd-test', copy_path = None):
6
7
  path = kagglehub.dataset_download(f'junshan888/{data_name}')
@@ -14,3 +15,21 @@ def read_data(data_name = 'evpd-test', copy_path = None):
14
15
  print(f"✅ Dataset has been copied to: {copy_path}/{data_name}")
15
16
 
16
17
  # example: read_data(copy_path='./exp_data')
18
+
19
+
20
+ def list_user_datasets():
21
+ api = KaggleApi()
22
+ api.authenticate()
23
+
24
+ # Get the list of datasets for a specific user
25
+ datasets = api.dataset_list(user='junshan888')
26
+
27
+ print('*' * 60)
28
+ if datasets is not None:
29
+ for ds in datasets:
30
+ if ds is not None:
31
+ # Print the dataset title
32
+ print(ds.title)
33
+ print('*' * 60)
34
+
35
+ # example: list_user_datasets()
@@ -1,14 +1,15 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: junshan_kit
3
- Version: 1.1.3
3
+ Version: 1.1.5
4
4
  Summary: xxx
5
5
  Author-email: Junshan Yin <junshanyin@163.com>
6
+ Requires-Dist: kaggle==1.7.4.5
6
7
  Requires-Dist: kagglehub==0.3.13
7
8
  Requires-Dist: numpy==2.2.6
8
9
  Requires-Dist: scikit-learn==1.7.1
9
10
  Description-Content-Type: text/markdown
10
11
 
11
- example
12
+ example--2
12
13
 
13
14
 
14
15
 
@@ -0,0 +1,5 @@
1
+ junshan_kit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ junshan_kit/kaggle_hub.py,sha256=wUQGHx69w64eMC4CsTEhfmyhpBSUyXmN9kfDaM_sRes,1026
3
+ junshan_kit-1.1.5.dist-info/METADATA,sha256=6X3IDb8MytIdgJ1HfEgTPUvJ0fu_yk9GJgW00XbLF88,303
4
+ junshan_kit-1.1.5.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
5
+ junshan_kit-1.1.5.dist-info/RECORD,,
@@ -1,5 +0,0 @@
1
- junshan_kit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- junshan_kit/kaggle_hub.py,sha256=b-WVRvvkCKTteNxzcQkLm3WqVuzD-tuHPhkZ02320aE,556
3
- junshan_kit-1.1.3.dist-info/METADATA,sha256=BeAryN-SsP8UoI7EYWvbLhXlaZ1y-zoFrfljiNGQ_Ss,269
4
- junshan_kit-1.1.3.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
5
- junshan_kit-1.1.3.dist-info/RECORD,,