homa 2.1__tar.gz → 2.3__tar.gz

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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: homa
3
- Version: 2.1
3
+ Version: 2.3
4
4
  Maintainer: Taha Shieenavaz
5
5
  Maintainer-email: tahashieenavaz@gmail.com
6
6
  Description-Content-Type: text/markdown
@@ -11,5 +11,5 @@ Requires-Dist: torch
11
11
  # Homa
12
12
 
13
13
  <div align="center">
14
- <img src="art/homa.svg" width="500" />
14
+ <img src="https://github.com/tahashieenavaz/homa/raw/main/art/homa.svg" width="500" />
15
15
  </div>
homa-2.3/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # Homa
2
+
3
+ <div align="center">
4
+ <img src="https://github.com/tahashieenavaz/homa/raw/main/art/homa.svg" width="500" />
5
+ </div>
@@ -1,2 +1,3 @@
1
1
  from .datasets import ImageDataset
2
2
  from .datasets import AugmentedDataset
3
+ from .helpers import pickle
@@ -0,0 +1,22 @@
1
+ import pickle
2
+
3
+
4
+ def pickle(filename_or_variable: str | object, target_file: str | None = None):
5
+ if not target_file and isinstance(filename_or_variable, str):
6
+ return read_from_pickle(filename_or_variable)
7
+
8
+ if target_file and isinstance(filename_or_variable, object):
9
+ write_to_pickle(filename_or_variable, target_file)
10
+
11
+ raise Exception("Wrong pickle helper inputs")
12
+
13
+
14
+ def write_to_pickle(data, filename):
15
+ with open(filename, "wb") as f:
16
+ pickle.dump(data, f)
17
+
18
+
19
+ def read_from_pickle(filename):
20
+ with open(filename, "rb") as f:
21
+ data = pickle.load(f)
22
+ return data
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: homa
3
- Version: 2.1
3
+ Version: 2.3
4
4
  Maintainer: Taha Shieenavaz
5
5
  Maintainer-email: tahashieenavaz@gmail.com
6
6
  Description-Content-Type: text/markdown
@@ -11,5 +11,5 @@ Requires-Dist: torch
11
11
  # Homa
12
12
 
13
13
  <div align="center">
14
- <img src="art/homa.svg" width="500" />
14
+ <img src="https://github.com/tahashieenavaz/homa/raw/main/art/homa.svg" width="500" />
15
15
  </div>
@@ -3,6 +3,7 @@ README.md
3
3
  setup.py
4
4
  homa/__init__.py
5
5
  homa/datasets.py
6
+ homa/helpers.py
6
7
  homa.egg-info/PKG-INFO
7
8
  homa.egg-info/SOURCES.txt
8
9
  homa.egg-info/dependency_links.txt
homa-2.1/README.md DELETED
@@ -1,5 +0,0 @@
1
- # Homa
2
-
3
- <div align="center">
4
- <img src="art/homa.svg" width="500" />
5
- </div>
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes