libs5-python 1.0.12__tar.gz → 1.0.14__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.
Files changed (31) hide show
  1. {libs5_python-1.0.12 → libs5_python-1.0.14}/.gitignore +46 -1
  2. {libs5_python-1.0.12 → libs5_python-1.0.14}/PKG-INFO +2 -2
  3. libs5_python-1.0.14/install.sh +3 -0
  4. {libs5_python-1.0.12 → libs5_python-1.0.14}/pyproject.toml +1 -1
  5. {libs5_python-1.0.12 → libs5_python-1.0.14}/src/net/hypki/Logger.py +2 -2
  6. libs5_python-1.0.14/src/net/hypki/StringUtils.py +47 -0
  7. {libs5_python-1.0.12 → libs5_python-1.0.14}/src/net/hypki/args.py +8 -1
  8. libs5_python-1.0.14/src/net/hypki/random.py +26 -0
  9. {libs5_python-1.0.12 → libs5_python-1.0.14}/src/net/hypki/regex.py +2 -2
  10. libs5_python-1.0.12/install.sh +0 -3
  11. libs5_python-1.0.12/src/net/hypki/StringUtils.py +0 -23
  12. libs5_python-1.0.12/src/net/hypki/random.py +0 -14
  13. {libs5_python-1.0.12 → libs5_python-1.0.14}/LICENSE +0 -0
  14. {libs5_python-1.0.12 → libs5_python-1.0.14}/MANIFEST.in +0 -0
  15. {libs5_python-1.0.12 → libs5_python-1.0.14}/README.md +0 -0
  16. {libs5_python-1.0.12 → libs5_python-1.0.14}/requirements.txt +0 -0
  17. {libs5_python-1.0.12 → libs5_python-1.0.14}/setup.py +0 -0
  18. {libs5_python-1.0.12 → libs5_python-1.0.14}/src/net/__init__.py +0 -0
  19. {libs5_python-1.0.12 → libs5_python-1.0.14}/src/net/hypki/File.py +0 -0
  20. {libs5_python-1.0.12 → libs5_python-1.0.14}/src/net/hypki/Ini.py +0 -0
  21. {libs5_python-1.0.12 → libs5_python-1.0.14}/src/net/hypki/UserIO.py +0 -0
  22. {libs5_python-1.0.12 → libs5_python-1.0.14}/src/net/hypki/__init__.py +0 -0
  23. {libs5_python-1.0.12 → libs5_python-1.0.14}/src/net/hypki/apiutils.py +0 -0
  24. {libs5_python-1.0.12 → libs5_python-1.0.14}/src/net/hypki/asserts.py +0 -0
  25. {libs5_python-1.0.12 → libs5_python-1.0.14}/src/net/hypki/io.py +0 -0
  26. {libs5_python-1.0.12 → libs5_python-1.0.14}/src/net/hypki/log.py +0 -0
  27. {libs5_python-1.0.12 → libs5_python-1.0.14}/src/net/hypki/math.py +0 -0
  28. {libs5_python-1.0.12 → libs5_python-1.0.14}/src/net/hypki/system.py +0 -0
  29. {libs5_python-1.0.12 → libs5_python-1.0.14}/src/net/hypki/tests/__init__.py +0 -0
  30. {libs5_python-1.0.12 → libs5_python-1.0.14}/src/net/hypki/tests/kepler.py +0 -0
  31. {libs5_python-1.0.12 → libs5_python-1.0.14}/src/net/hypki/tests/numpytest.py +0 -0
@@ -51,4 +51,49 @@ dist/libs5_python-1.0.9.tar.gz
51
51
  dist/libs5_python-1.0.10-py3-none-any.whl
52
52
  dist/libs5_python-1.0.10.tar.gz
53
53
  dist/libs5_python-1.0.11-py3-none-any.whl
54
- dist/libs5_python-1.0.11.tar.gz
54
+ dist/libs5_python-1.0.11.tar.gz
55
+ dist/libs5_python-1.0.12-py3-none-any.whl
56
+ dist/libs5_python-1.0.12.tar.gz
57
+ src/net/__pycache__/__init__.cpython-314.pyc
58
+ src/net/hypki/__pycache__/File.cpython-314.pyc
59
+ src/net/hypki/__pycache__/Ini.cpython-314.pyc
60
+ src/net/hypki/__pycache__/Logger.cpython-314.pyc
61
+ src/net/hypki/__pycache__/StringUtils.cpython-314.pyc
62
+ src/net/hypki/__pycache__/__init__.cpython-314.pyc
63
+ src/net/hypki/__pycache__/args.cpython-314.pyc
64
+ src/net/hypki/__pycache__/io.cpython-314.pyc
65
+ src/net/hypki/__pycache__/log.cpython-314.pyc
66
+ src/net/hypki/__pycache__/regex.cpython-314.pyc
67
+ src/net/hypki/__pycache__/UserIO.cpython-314.pyc
68
+ src/net/hypki/__pycache__/apiutils.cpython-314.pyc
69
+ _KOSZdist/libs5_python-1.0.0-py3-none-any.whl
70
+ _KOSZdist/libs5_python-1.0.0.tar.gz
71
+ _KOSZdist/libs5_python-1.0.1-py3-none-any.whl
72
+ _KOSZdist/libs5_python-1.0.1.tar.gz
73
+ _KOSZdist/libs5_python-1.0.10-py3-none-any.whl
74
+ _KOSZdist/libs5_python-1.0.10.tar.gz
75
+ _KOSZdist/libs5_python-1.0.11-py3-none-any.whl
76
+ _KOSZdist/libs5_python-1.0.11.tar.gz
77
+ _KOSZdist/libs5_python-1.0.12-py3-none-any.whl
78
+ _KOSZdist/libs5_python-1.0.12.tar.gz
79
+ _KOSZdist/libs5_python-1.0.13-py3-none-any.whl
80
+ _KOSZdist/libs5_python-1.0.13.tar.gz
81
+ _KOSZdist/libs5_python-1.0.14-py3-none-any.whl
82
+ _KOSZdist/libs5_python-1.0.14.tar.gz
83
+ _KOSZdist/libs5_python-1.0.15-py3-none-any.whl
84
+ _KOSZdist/libs5_python-1.0.15.tar.gz
85
+ _KOSZdist/libs5_python-1.0.2-py3-none-any.whl
86
+ _KOSZdist/libs5_python-1.0.2.tar.gz
87
+ _KOSZdist/libs5_python-1.0.3-py3-none-any.whl
88
+ _KOSZdist/libs5_python-1.0.3.tar.gz
89
+ _KOSZdist/libs5_python-1.0.5-py3-none-any.whl
90
+ _KOSZdist/libs5_python-1.0.5.tar.gz
91
+ _KOSZdist/libs5_python-1.0.6-py3-none-any.whl
92
+ _KOSZdist/libs5_python-1.0.6.tar.gz
93
+ _KOSZdist/libs5_python-1.0.7-py3-none-any.whl
94
+ _KOSZdist/libs5_python-1.0.7.tar.gz
95
+ _KOSZdist/libs5_python-1.0.9-py3-none-any.whl
96
+ _KOSZdist/libs5_python-1.0.9.tar.gz
97
+ dist/libs5_python-1.0.13-py3-none-any.whl
98
+ dist/libs5_python-1.0.13.tar.gz
99
+ src/net/hypki/__pycache__/random.cpython-314.pyc
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: libs5-python
3
- Version: 1.0.12
3
+ Version: 1.0.14
4
4
  Summary: libs5 python scripts, and helper classes (useg e.g. in BEANS software)
5
5
  Project-URL: Homepage, https://gitlab.com/ahypki/libs5-python
6
6
  Project-URL: Issues, https://gitlab.com/ahypki/libs5-python/-/issues/
@@ -0,0 +1,3 @@
1
+ python3 -m build
2
+ twine upload dist/* --verbose
3
+ pip install libs5-python --break-system-packages --upgrade
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "libs5-python"
7
- version = "1.0.12"
7
+ version = "1.0.14"
8
8
  authors = [
9
9
  { name="Arkadiusz Hypki" },
10
10
  ]
@@ -3,9 +3,9 @@ Created on Aug 13, 2025
3
3
 
4
4
  @author: ahypki
5
5
  '''
6
- from rich.console import Console
6
+ # from rich.console import Console
7
7
 
8
- console = Console()
8
+ # console = Console()
9
9
 
10
10
  class Logger:
11
11
  BLUE = '[blue]'#'\033[94m'
@@ -0,0 +1,47 @@
1
+ '''
2
+ Created on Oct 14, 2025
3
+
4
+ @author: ahypki
5
+ '''
6
+ import json
7
+
8
+ class StringUtils(object):
9
+ '''
10
+ classdocs
11
+ '''
12
+
13
+
14
+ def __init__(self, params):
15
+ '''
16
+ Constructor
17
+ '''
18
+ pass
19
+
20
+ def notEmpty(s): # @NoSelf
21
+ return not StringUtils.isEmpty(s) #len(s.strip()) > 0 if s is not None else False
22
+
23
+ def isEmpty(s): # @NoSelf
24
+ if s is None:
25
+ return True
26
+ if len(s.strip()) == 0:
27
+ return True
28
+ else:
29
+ return False
30
+
31
+ def jsonPretty(json_thing, sort=True, indents=4): # @NoSelf
32
+ if type(json_thing) is str:
33
+ return json.dumps(json.loads(json_thing), sort_keys=sort, indent=indents)
34
+ else:
35
+ return json.dumps(json_thing, sort_keys=sort, indent=indents)
36
+
37
+ def replace(s, what, withWhat): # @NoSelf
38
+ return s.replace(what, withWhat)
39
+
40
+ def replaceInf(s, what, withWhat): # @NoSelf
41
+ i = 0
42
+ while True:
43
+ sprim = s.replace(what, withWhat)
44
+ if len(sprim) == len(s) or i > 1000:
45
+ break;
46
+ i += 1
47
+ return sprim
@@ -32,4 +32,11 @@ class ArgUtils:
32
32
  return len(sys.argv)
33
33
 
34
34
  def getArg(idx): # @NoSelf
35
- return sys.argv[idx]
35
+ return sys.argv[idx]
36
+
37
+ def getArgNames(): # @NoSelf
38
+ names = []
39
+ for i in range(len(sys.argv)):
40
+ if sys.argv[i].startswith("--"):
41
+ names.append(sys.argv[i][2:])
42
+ return names
@@ -0,0 +1,26 @@
1
+ '''
2
+ Created on 18-07-2013
3
+
4
+ @author: ahypki
5
+ '''
6
+
7
+ import os
8
+ import uuid
9
+ import base64
10
+ import random
11
+
12
+ class RandomUtils:
13
+
14
+ def nextDouble(max = None): # @NoSelf
15
+ if max is not None:
16
+ return random.random() * max
17
+ else:
18
+ return random.random()
19
+
20
+ def nextInt(minInt = 0, maxInt = 1): # @NoSelf
21
+ return random.randint(minInt, maxInt)
22
+
23
+ def nextUuid():
24
+ return str(uuid.uuid4())
25
+ # r_uuid = base64.urlsafe_b64encode(uuid.uuid4().bytes)
26
+ # return str(r_uuid.replace('=', ''))
@@ -30,10 +30,10 @@ def allGroups(s, regex):
30
30
  return ""
31
31
 
32
32
  def isLong(strNumber):
33
- return matches(strNumber, "^[\d]+$")
33
+ return matches(strNumber, "^[\\d]+$")
34
34
 
35
35
  def isDouble(strNumber):
36
- return matches(strNumber, "[\d]+\.[\d\+\-eE]+")
36
+ return matches(strNumber, "^[\\d]+\\.[\\d\\+\\-eE]+$")
37
37
 
38
38
  def matches(s, regex):
39
39
  r = re.compile(regex)
@@ -1,3 +0,0 @@
1
- python3 -m build
2
- twine upload dist/*
3
- pip install libs5-python --break-system-packages --upgrade
@@ -1,23 +0,0 @@
1
- '''
2
- Created on Oct 14, 2025
3
-
4
- @author: ahypki
5
- '''
6
-
7
- class StringUtils(object):
8
- '''
9
- classdocs
10
- '''
11
-
12
-
13
- def __init__(self, params):
14
- '''
15
- Constructor
16
- '''
17
- pass
18
-
19
- def notEmpty(s): # @NoSelf
20
- return not StringUtils.isEmpty(s) #len(s.strip()) > 0 if s is not None else False
21
-
22
- def isEmpty(s): # @NoSelf
23
- return s is None or len(s.strip()) == 0 if s is not None else False
@@ -1,14 +0,0 @@
1
- '''
2
- Created on 18-07-2013
3
-
4
- @author: ahypki
5
- '''
6
-
7
- import os
8
- import uuid
9
- import base64
10
-
11
- def nextUuid():
12
- return str(uuid.uuid4())
13
- # r_uuid = base64.urlsafe_b64encode(uuid.uuid4().bytes)
14
- # return str(r_uuid.replace('=', ''))
File without changes
File without changes
File without changes
File without changes