Myosotis-Researches 0.1.25__py3-none-any.whl → 0.1.26__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.
@@ -1,2 +1,2 @@
1
1
  from .concat_image import concat_image
2
- from .dataset import view_dataset, download_dataset
2
+ from .dataset import view_dataset, download_datasets
@@ -19,28 +19,27 @@ def view_dataset(dataset_path):
19
19
  f.visititems(_print_hdf5)
20
20
 
21
21
 
22
- # download_dataset
22
+ # download_datasets
23
23
  _file_id_dict = {
24
24
  "Ra": "1YVLFAaQ1ldre0ASLSRdV_kPIcAMkwGqO",
25
25
  "MNIST": "18249ryrDPsznWWtOkJuALZWCVoZqfibC",
26
26
  }
27
27
 
28
28
 
29
- def download_dataset(dataset_name, dataset_path):
30
- dataset_dir = os.path.dirname(dataset_path)
31
- if not os.path.exists(dataset_dir):
32
- os.makedirs(dataset_dir, exist_ok=True)
33
- zipped_dataset_path = os.path.join(dataset_dir, f"{dataset_name}.rar")
34
- file_id = _file_id_dict[dataset_name]
29
+ def download_datasets(datasets_name, datasets_dir):
30
+ if not os.path.exists(datasets_dir):
31
+ os.makedirs(datasets_dir, exist_ok=True)
32
+ zipped_datasets_path = os.path.join(datasets_dir, f"{datasets_name}.rar")
33
+ file_id = _file_id_dict[datasets_name]
35
34
  url = f"https://drive.google.com/uc?id={file_id}"
36
- gdown.download(url, zipped_dataset_path, quiet=False, use_cookies=False)
35
+ gdown.download(url, zipped_datasets_path, quiet=False, use_cookies=False)
37
36
  unzip_password = getpass.getpass("Please input the zipped file's password:")
38
37
  try:
39
- cmd = ["unrar", "x", f"-p{unzip_password}", zipped_dataset_path, dataset_dir]
38
+ cmd = ["unrar", "x", f"-p{unzip_password}", zipped_datasets_path, datasets_dir]
40
39
  subprocess.run(cmd, check=True)
41
40
  except subprocess.CalledProcessError as e:
42
41
  print(e)
43
- os.remove(zipped_dataset_path)
42
+ os.remove(zipped_datasets_path)
44
43
 
45
44
 
46
- __all__ = ["view_dataset", "download_dataset"]
45
+ __all__ = ["view_dataset", "download_datasets"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Myosotis-Researches
3
- Version: 0.1.25
3
+ Version: 0.1.26
4
4
  Summary: A repository for storing my progress of researches.
5
5
  Home-page: https://github.com/Zeyu-Xie/Myosotis-Researches
6
6
  Author: Zeyu Xie
@@ -26,11 +26,11 @@ myosotis_researches/CcGAN/train/train_ccgan.py,sha256=0Qxibgd2-WaYgbyYeeOyiMkdcw
26
26
  myosotis_researches/CcGAN/train/train_cgan.py,sha256=sxMzvlmdjmqufwJFxBwatcoJecYqn2Uidedu15CL9ws,9619
27
27
  myosotis_researches/CcGAN/train/train_cgan_concat.py,sha256=OrQbwdU_ujUeKFGixUUpnini6rURtbuHv9NDrP6g0X0,8861
28
28
  myosotis_researches/CcGAN/train/train_net_for_label_embed.py,sha256=4j6r4_o4rXgAN4MdUQL-TXqZJpbhH7d9gWQR8YzBlXw,6976
29
- myosotis_researches/CcGAN/utils/__init__.py,sha256=Bbx4fAIpe_jo8bsxdNANf99sQ4xC_xCTGhLAHD02L_k,91
29
+ myosotis_researches/CcGAN/utils/__init__.py,sha256=Y6HFAJRAOa4rMXhd1KIyr3NL_GzO0vjbp-dE4NT7QW8,92
30
30
  myosotis_researches/CcGAN/utils/concat_image.py,sha256=BIGKz52Inn9S7M5fBFKye2V9bLJ0DqEQILoOVWAXUiE,2165
31
- myosotis_researches/CcGAN/utils/dataset.py,sha256=tP1Fb1CJ_2Z8uwV8pNgHGPX3FI40turID2JDvH3OCns,1397
32
- myosotis_researches-0.1.25.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
33
- myosotis_researches-0.1.25.dist-info/METADATA,sha256=MWAFxcG3TRoj4Y8y-VzeYIzFWq5ci9TQLajTQ2BDOnM,3484
34
- myosotis_researches-0.1.25.dist-info/WHEEL,sha256=ooBFpIzZCPdw3uqIQsOo4qqbA4ZRPxHnOH7peeONza0,91
35
- myosotis_researches-0.1.25.dist-info/top_level.txt,sha256=zxAiMn5eyZNJM28MewTAkgi_RZJMbfWbzVR-KF0LdZE,20
36
- myosotis_researches-0.1.25.dist-info/RECORD,,
31
+ myosotis_researches/CcGAN/utils/dataset.py,sha256=wDe-fABslaLXOY5Kbmlm0mQ_8CPEK7Y2YkEy-XAiQHI,1363
32
+ myosotis_researches-0.1.26.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
33
+ myosotis_researches-0.1.26.dist-info/METADATA,sha256=yN5d9W51yJkKBOGW2VrFdBVQx5jSFMrkmai57ZuoqGM,3484
34
+ myosotis_researches-0.1.26.dist-info/WHEEL,sha256=ooBFpIzZCPdw3uqIQsOo4qqbA4ZRPxHnOH7peeONza0,91
35
+ myosotis_researches-0.1.26.dist-info/top_level.txt,sha256=zxAiMn5eyZNJM28MewTAkgi_RZJMbfWbzVR-KF0LdZE,20
36
+ myosotis_researches-0.1.26.dist-info/RECORD,,