homa 3.2__tar.gz → 3.4__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: homa
3
- Version: 3.2
3
+ Version: 3.4
4
4
  Maintainer: Taha Shieenavaz
5
5
  Maintainer-email: tahashieenavaz@gmail.com
6
6
  Description-Content-Type: text/markdown
@@ -12,10 +12,10 @@ Requires-Dist: torch
12
12
 
13
13
  - [Homa](#homa)
14
14
  - [Helpers](#helpers)
15
- - [Device](#device)
16
- - [Pickle](#pickle)
15
+ - [get\_device](#get_device)
16
+ - [pickle](#pickle)
17
17
  - [Transformers](#transformers)
18
- - [Positional Encoding](#positional-encoding)
18
+ - [positional\_encoding](#positional_encoding)
19
19
 
20
20
  <div align="center">
21
21
  <img src="https://github.com/tahashieenavaz/homa/raw/main/art/homa.svg" width="500" />
@@ -23,7 +23,7 @@ Requires-Dist: torch
23
23
 
24
24
  ## Helpers
25
25
 
26
- ### Device
26
+ ### get_device
27
27
 
28
28
  ```py
29
29
  from homa import get_device
@@ -31,7 +31,7 @@ from homa import get_device
31
31
  torch.tensor(torch.randint(-20, 10, (32, 10))).to(get_device())
32
32
  ```
33
33
 
34
- ### Pickle
34
+ ### pickle
35
35
 
36
36
  ```py
37
37
  from homa import pickle
@@ -44,7 +44,7 @@ loaded_person = pickle("person.pkl")
44
44
 
45
45
  ## Transformers
46
46
 
47
- ### Positional Encoding
47
+ ### positional_encoding
48
48
 
49
49
  ```py
50
50
  from homa import positional_encoding
@@ -2,10 +2,10 @@
2
2
 
3
3
  - [Homa](#homa)
4
4
  - [Helpers](#helpers)
5
- - [Device](#device)
6
- - [Pickle](#pickle)
5
+ - [get\_device](#get_device)
6
+ - [pickle](#pickle)
7
7
  - [Transformers](#transformers)
8
- - [Positional Encoding](#positional-encoding)
8
+ - [positional\_encoding](#positional_encoding)
9
9
 
10
10
  <div align="center">
11
11
  <img src="https://github.com/tahashieenavaz/homa/raw/main/art/homa.svg" width="500" />
@@ -13,7 +13,7 @@
13
13
 
14
14
  ## Helpers
15
15
 
16
- ### Device
16
+ ### get_device
17
17
 
18
18
  ```py
19
19
  from homa import get_device
@@ -21,7 +21,7 @@ from homa import get_device
21
21
  torch.tensor(torch.randint(-20, 10, (32, 10))).to(get_device())
22
22
  ```
23
23
 
24
- ### Pickle
24
+ ### pickle
25
25
 
26
26
  ```py
27
27
  from homa import pickle
@@ -34,7 +34,7 @@ loaded_person = pickle("person.pkl")
34
34
 
35
35
  ## Transformers
36
36
 
37
- ### Positional Encoding
37
+ ### positional_encoding
38
38
 
39
39
  ```py
40
40
  from homa import positional_encoding
@@ -3,3 +3,6 @@ from .helpers import pickle
3
3
  from .helpers import flush
4
4
 
5
5
  from .transformers import positional_encoding
6
+
7
+ from .date import day_delta
8
+ from .date import today
homa-3.4/homa/date.py ADDED
@@ -0,0 +1,15 @@
1
+ import datetime
2
+ from datetime import datetime, timedelta
3
+
4
+
5
+ def today():
6
+ return datetime.today().strftime("%Y-%m-%d")
7
+
8
+
9
+ def day_delta(date_str: str | int, days: int | None = None):
10
+ if isinstance(date_str, int) and not days:
11
+ return day_delta(today(), date_str)
12
+
13
+ date_obj = datetime.strptime(date_str, "%Y-%m-%d")
14
+ new_date_obj = date_obj + timedelta(days=days)
15
+ return new_date_obj.strftime("%Y-%m-%d")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: homa
3
- Version: 3.2
3
+ Version: 3.4
4
4
  Maintainer: Taha Shieenavaz
5
5
  Maintainer-email: tahashieenavaz@gmail.com
6
6
  Description-Content-Type: text/markdown
@@ -12,10 +12,10 @@ Requires-Dist: torch
12
12
 
13
13
  - [Homa](#homa)
14
14
  - [Helpers](#helpers)
15
- - [Device](#device)
16
- - [Pickle](#pickle)
15
+ - [get\_device](#get_device)
16
+ - [pickle](#pickle)
17
17
  - [Transformers](#transformers)
18
- - [Positional Encoding](#positional-encoding)
18
+ - [positional\_encoding](#positional_encoding)
19
19
 
20
20
  <div align="center">
21
21
  <img src="https://github.com/tahashieenavaz/homa/raw/main/art/homa.svg" width="500" />
@@ -23,7 +23,7 @@ Requires-Dist: torch
23
23
 
24
24
  ## Helpers
25
25
 
26
- ### Device
26
+ ### get_device
27
27
 
28
28
  ```py
29
29
  from homa import get_device
@@ -31,7 +31,7 @@ from homa import get_device
31
31
  torch.tensor(torch.randint(-20, 10, (32, 10))).to(get_device())
32
32
  ```
33
33
 
34
- ### Pickle
34
+ ### pickle
35
35
 
36
36
  ```py
37
37
  from homa import pickle
@@ -44,7 +44,7 @@ loaded_person = pickle("person.pkl")
44
44
 
45
45
  ## Transformers
46
46
 
47
- ### Positional Encoding
47
+ ### positional_encoding
48
48
 
49
49
  ```py
50
50
  from homa import positional_encoding
@@ -3,6 +3,7 @@ README.md
3
3
  setup.py
4
4
  homa/__init__.py
5
5
  homa/datasets.py
6
+ homa/date.py
6
7
  homa/helpers.py
7
8
  homa/transformers.py
8
9
  homa.egg-info/PKG-INFO
@@ -8,7 +8,7 @@ setup(
8
8
  name="homa",
9
9
  maintainer="Taha Shieenavaz",
10
10
  maintainer_email="tahashieenavaz@gmail.com",
11
- version=3.02,
11
+ version=3.4,
12
12
  packages=find_packages(),
13
13
  install_requires=["torchvision", "torch"],
14
14
  long_description=description,
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes