junshan-kit 2.1.3__py2.py3-none-any.whl → 2.1.4__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 CHANGED
@@ -1,24 +1,30 @@
1
1
  import kagglehub
2
2
  import os
3
+ import warnings
3
4
  import shutil
4
5
  from kaggle.api.kaggle_api_extended import KaggleApi
5
6
 
6
7
  class kaggle_data:
7
- def list_user_datasets(self):
8
+ def list_datasets(self):
8
9
  api = KaggleApi()
9
10
  api.authenticate()
10
-
11
- # Get the list of datasets for a specific user
12
11
  datasets = api.dataset_list(user='junshan888')
13
-
12
+ print('Available datasets:')
14
13
  print('*' * 60)
15
14
  if datasets is not None:
16
15
  for ds in datasets:
17
16
  if ds is not None:
18
- # Print the dataset title
19
17
  print(ds.title)
20
18
  print('*' * 60)
21
19
 
20
+ def list_user_datasets(self):
21
+ warnings.warn(
22
+ "list_user_datasets() is deprecated. Use list_datasets() instead.",
23
+ DeprecationWarning,
24
+ stacklevel=2
25
+ )
26
+ return self.list_datasets()
27
+
22
28
  # example: list_user_datasets()
23
29
 
24
30
  #---------------------------------------------------------------
@@ -40,7 +46,6 @@ if __name__ == "__main__":
40
46
  # Your code here
41
47
  data = kaggle_data()
42
48
  # Example usage
43
- print('Available datasets:')
44
49
  data.list_user_datasets()
45
50
  data.download_data(data_name='letter-libsvm', copy_path='./exp_data/Letter')
46
51
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: junshan_kit
3
- Version: 2.1.3
3
+ Version: 2.1.4
4
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
@@ -0,0 +1,5 @@
1
+ junshan_kit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ junshan_kit/datahub.py,sha256=H5Er9sowGyPhBLEg1UFGYwVLOtGUkonxnVjkWwxixOY,1812
3
+ junshan_kit-2.1.4.dist-info/METADATA,sha256=Mxa0XwUl-hgpri-PTzhPVu5j0OG2Tt8GY3Y0EGazTzM,570
4
+ junshan_kit-2.1.4.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
5
+ junshan_kit-2.1.4.dist-info/RECORD,,
@@ -1,5 +0,0 @@
1
- junshan_kit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- junshan_kit/datahub.py,sha256=G1WmHEQvUnlpyZrC1vDCLBI-ZVeCA-lHoQ8qiL4I7p0,1655
3
- junshan_kit-2.1.3.dist-info/METADATA,sha256=HZwmPFyfHIJSdOfNWhBj0Ddg684BrpoV6_DCKkGxshk,570
4
- junshan_kit-2.1.3.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
5
- junshan_kit-2.1.3.dist-info/RECORD,,