homa 2.2__tar.gz → 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.
Potentially problematic release.
This version of homa might be problematic. Click here for more details.
- {homa-2.2 → homa-3}/PKG-INFO +1 -1
- {homa-2.2 → homa-3}/homa/__init__.py +1 -0
- homa-3/homa/helpers.py +22 -0
- {homa-2.2 → homa-3}/homa.egg-info/PKG-INFO +1 -1
- {homa-2.2 → homa-3}/homa.egg-info/SOURCES.txt +1 -0
- {homa-2.2 → homa-3}/setup.py +1 -9
- {homa-2.2 → homa-3}/LICENSE +0 -0
- {homa-2.2 → homa-3}/README.md +0 -0
- {homa-2.2 → homa-3}/homa/datasets.py +0 -0
- {homa-2.2 → homa-3}/homa.egg-info/dependency_links.txt +0 -0
- {homa-2.2 → homa-3}/homa.egg-info/requires.txt +0 -0
- {homa-2.2 → homa-3}/homa.egg-info/top_level.txt +0 -0
- {homa-2.2 → homa-3}/setup.cfg +0 -0
{homa-2.2 → homa-3}/PKG-INFO
RENAMED
homa-3/homa/helpers.py
ADDED
|
@@ -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
|
{homa-2.2 → homa-3}/setup.py
RENAMED
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
from setuptools import setup
|
|
2
2
|
from setuptools import find_packages
|
|
3
|
-
from sys import argv
|
|
4
3
|
|
|
5
4
|
with open("README.md") as fh:
|
|
6
5
|
description = fh.read()
|
|
7
6
|
|
|
8
|
-
with open("version.txt", "r") as fh:
|
|
9
|
-
current_version = float(fh.readline())
|
|
10
|
-
|
|
11
|
-
with open("version.txt", "w") as fh:
|
|
12
|
-
next_version = round(current_version + 0.01, 2)
|
|
13
|
-
fh.write(str(next_version))
|
|
14
|
-
|
|
15
7
|
setup(
|
|
16
8
|
name="homa",
|
|
17
9
|
maintainer="Taha Shieenavaz",
|
|
18
10
|
maintainer_email="tahashieenavaz@gmail.com",
|
|
19
|
-
version=
|
|
11
|
+
version=3,
|
|
20
12
|
packages=find_packages(),
|
|
21
13
|
install_requires=["torchvision", "torch"],
|
|
22
14
|
long_description=description,
|
{homa-2.2 → homa-3}/LICENSE
RENAMED
|
File without changes
|
{homa-2.2 → homa-3}/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{homa-2.2 → homa-3}/setup.cfg
RENAMED
|
File without changes
|