homa 0.25__py3-none-any.whl → 0.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,4 +1,4 @@
1
- from ..helpers.environment import is_colab
1
+ from ..helpers.environment import isColab
2
2
  from ..helpers.string import randomLowercaseString
3
3
 
4
4
 
@@ -12,13 +12,13 @@ class RepositoryWrapper:
12
12
  "sigma": [0, 0]
13
13
  }
14
14
 
15
- if is_colab():
15
+ if isColab():
16
16
  from google.colab.patches import cv2_imshow as imshow
17
17
  else:
18
18
  from cv2 import imshow
19
19
 
20
20
  def final_imshow(window, image):
21
- if is_colab():
21
+ if isColab():
22
22
  imshow(image)
23
23
  else:
24
24
  imshow(window, image)
homa/classes/Window.py CHANGED
@@ -3,6 +3,7 @@ import cv2
3
3
 
4
4
  from ..helpers.kernel import createKernel
5
5
  from ..helpers.string import randomLowercaseString
6
+ from ..helpers.environment import isNotColab
6
7
 
7
8
  from ..classes.Repository import Repository
8
9
 
@@ -30,8 +31,11 @@ class Window:
30
31
  self.__events = {}
31
32
 
32
33
  def show(self):
33
- cv2.namedWindow(self.__title)
34
- cv2.setMouseCallback(self.__title, createMouseCallback(self.__events))
34
+ if isNotColab():
35
+ cv2.namedWindow(self.__title)
36
+ cv2.setMouseCallback(
37
+ self.__title, createMouseCallback(self.__events))
38
+
35
39
  Repository.imshow(self.__title, self.__image)
36
40
 
37
41
  def title(self, newTitle: str) -> Self:
@@ -1,5 +1,9 @@
1
1
  import sys
2
2
 
3
3
 
4
- def is_colab() -> bool:
4
+ def isColab() -> bool:
5
5
  return 'google.colab' in sys.modules
6
+
7
+
8
+ def isNotColab() -> bool:
9
+ return not isColab()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: homa
3
- Version: 0.25
3
+ Version: 0.26
4
4
  Maintainer: Taha Shieenavaz
5
5
  Maintainer-email: tahashieenavaz@gmail.com
6
6
  Description-Content-Type: text/markdown
@@ -11,18 +11,18 @@ homa/spaces.py,sha256=W2UjzEP54dDgOV4c8xNCu8qJ__j-hwRbnyIOGnwpHwE,804
11
11
  homa/classes/Collection.py,sha256=7hskbC8wxTAC3hHmFYXtzR5W05lsA4GaYTzjiez_6Zg,222
12
12
  homa/classes/Image.py,sha256=kpIZQjJMUcT9b2V1daX87KFQooAtsHUDR4Fcgk9Qfco,490
13
13
  homa/classes/Logger.py,sha256=2VjXJzBLMW5joArFpu2wGrbWUw7S-77z7LNhKUG1Iow,93
14
- homa/classes/Repository.py,sha256=vvX36nK-sN0eQAf7vNR2KVwosj76VCeQwaGT5pw8Lkw,840
15
- homa/classes/Window.py,sha256=orhuI7RmM5I_bmlWicR1G-be74EEexHixCuYIX46Y3E,2941
14
+ homa/classes/Repository.py,sha256=-E-Ltlr2sudFdr9pN9Bnfib4xkZB6hOCQ_vXGjhzQIc,837
15
+ homa/classes/Window.py,sha256=n_f9RBNl08kuO7sY45VEnbfqmOD3pTANIzlaP-5ou1U,3037
16
16
  homa/classes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  homa/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
18
  homa/helpers/alias.py,sha256=Gv4esGK5SWKbmqvFUAKUfzDqlofdC27ZtndXxfaxE7E,453
19
- homa/helpers/environment.py,sha256=I7rD9B5zv3W8lkspntcshm5PZZRRSW81OqIjKOdZW6U,78
19
+ homa/helpers/environment.py,sha256=tGWrgYSu01ezZyqLzWN8I_RkFXgBFgYsvbwQptYQd5w,130
20
20
  homa/helpers/kernel.py,sha256=QIbwvx3XzG23TMCj7nUOgSirx3WK_29lkBeVlp2uzQw,329
21
21
  homa/helpers/string.py,sha256=nyNcQgZ9l5zf0QwI5gZCMX4dqMWi63VCqtl26ExDZsI,385
22
22
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
23
  tests/test_images.py,sha256=4k5tDcMc2YZOKAq3wNQnbJ_cO1Y_DQ-YUn82yzy__ww,772
24
- homa-0.25.dist-info/LICENSE,sha256=js3WDbJn9k5EN6sy1uuP2QBXxyPgS5DjO4Bf5yE35hQ,1072
25
- homa-0.25.dist-info/METADATA,sha256=wcp0pCuuQkPF9GxcanpkT6Ci_b1f17ogjsQiyAtYgfo,2472
26
- homa-0.25.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
27
- homa-0.25.dist-info/top_level.txt,sha256=i1-Cx_lkcOD5QJEK9JYp1uDEBhtshAN7No-99mhpOZ0,11
28
- homa-0.25.dist-info/RECORD,,
24
+ homa-0.26.dist-info/LICENSE,sha256=js3WDbJn9k5EN6sy1uuP2QBXxyPgS5DjO4Bf5yE35hQ,1072
25
+ homa-0.26.dist-info/METADATA,sha256=l8C-4VxoyVyn69qQ6aXTUBo9XE5tCtZ6kJnDLMVUORs,2472
26
+ homa-0.26.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
27
+ homa-0.26.dist-info/top_level.txt,sha256=i1-Cx_lkcOD5QJEK9JYp1uDEBhtshAN7No-99mhpOZ0,11
28
+ homa-0.26.dist-info/RECORD,,
File without changes
File without changes