libs5-python 1.0.13__py3-none-any.whl → 1.0.14__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.
- {libs5_python-1.0.13.dist-info → libs5_python-1.0.14.dist-info}/METADATA +1 -1
- {libs5_python-1.0.13.dist-info → libs5_python-1.0.14.dist-info}/RECORD +7 -7
- {libs5_python-1.0.13.dist-info → libs5_python-1.0.14.dist-info}/WHEEL +1 -1
- net/hypki/Logger.py +2 -2
- net/hypki/StringUtils.py +20 -1
- net/hypki/random.py +12 -0
- {libs5_python-1.0.13.dist-info → libs5_python-1.0.14.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: libs5-python
|
|
3
|
-
Version: 1.0.
|
|
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/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
net/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
net/hypki/File.py,sha256=2sKAqRBFmKsRL1Isqmj78rbD41MD3-QGgTB2iz5hcoc,1340
|
|
3
3
|
net/hypki/Ini.py,sha256=5o8INPYga1uk3O8V27exF6XaluaDayDiD0JkCgTUrj0,5730
|
|
4
|
-
net/hypki/Logger.py,sha256=
|
|
5
|
-
net/hypki/StringUtils.py,sha256=
|
|
4
|
+
net/hypki/Logger.py,sha256=dORtSpFuWL0sjht4dKvc3MPe_XJrVY8-SFh72RWoN0Y,1821
|
|
5
|
+
net/hypki/StringUtils.py,sha256=1WRhsUlGrY2iL8rYSGXBOvaQIQX3EnWGQvYxRgUofQE,1143
|
|
6
6
|
net/hypki/UserIO.py,sha256=cQeH8xjSzCI32l17pWXBBzAcA7lXByPt3NAFEvEWCMU,304
|
|
7
7
|
net/hypki/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
net/hypki/apiutils.py,sha256=E_0EKQ46BbdTHqVABky8DqIe1WetpglmsPWgnjUGeJQ,1036
|
|
@@ -11,13 +11,13 @@ net/hypki/asserts.py,sha256=awT2uysmbsPFpOBf6vaS0r39QBvsI5QGrwreXk0bwhE,198
|
|
|
11
11
|
net/hypki/io.py,sha256=H1ImSJojFbVa8Ww1iQ1Nr-sIjz_hEM0HkhMmSkFZEzo,1878
|
|
12
12
|
net/hypki/log.py,sha256=Qlbm1nZVBgs7EXF3Y12upGOU5Mpg0tL5YhJ3e6HGthQ,1730
|
|
13
13
|
net/hypki/math.py,sha256=-ZcIvUcSD5VTtPer6chvrARjL4BKEGqwsgnmAyfld4Q,197
|
|
14
|
-
net/hypki/random.py,sha256=
|
|
14
|
+
net/hypki/random.py,sha256=CQC5bDdmH9ik9d60KhNpxaoi9C7TwNOgQOghJasXG7M,542
|
|
15
15
|
net/hypki/regex.py,sha256=-_Eu1ccnGD7r-ikMQh8lQe39VFvFM-qCFFqq7FMlxJU,942
|
|
16
16
|
net/hypki/system.py,sha256=9MOAIJ221BH4GR4KKpPXexJGmFaWGZ1_wgi49kaFpmE,558
|
|
17
17
|
net/hypki/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
18
|
net/hypki/tests/kepler.py,sha256=3mEdHecMvM_ztUO17ZVvhxIXTze12-xx71A6Y3iaf_M,2307
|
|
19
19
|
net/hypki/tests/numpytest.py,sha256=FAyGjE2u_rqcoXUtj8HP4VbWP2f_LhOJ3hYVp37tDsA,378
|
|
20
|
-
libs5_python-1.0.
|
|
21
|
-
libs5_python-1.0.
|
|
22
|
-
libs5_python-1.0.
|
|
23
|
-
libs5_python-1.0.
|
|
20
|
+
libs5_python-1.0.14.dist-info/METADATA,sha256=HcF41XCgDkBYDdRwQW3Kf4O237sHPIc2xKQgYNaTLsI,1258
|
|
21
|
+
libs5_python-1.0.14.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
22
|
+
libs5_python-1.0.14.dist-info/licenses/LICENSE,sha256=jUGenC6Eo6P1BkABG3AQ2ThWGSDHgxa58dRIB8iR8Pc,1072
|
|
23
|
+
libs5_python-1.0.14.dist-info/RECORD,,
|
net/hypki/Logger.py
CHANGED
net/hypki/StringUtils.py
CHANGED
|
@@ -3,6 +3,7 @@ Created on Oct 14, 2025
|
|
|
3
3
|
|
|
4
4
|
@author: ahypki
|
|
5
5
|
'''
|
|
6
|
+
import json
|
|
6
7
|
|
|
7
8
|
class StringUtils(object):
|
|
8
9
|
'''
|
|
@@ -25,4 +26,22 @@ class StringUtils(object):
|
|
|
25
26
|
if len(s.strip()) == 0:
|
|
26
27
|
return True
|
|
27
28
|
else:
|
|
28
|
-
return False
|
|
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
|
net/hypki/random.py
CHANGED
|
@@ -7,6 +7,18 @@ Created on 18-07-2013
|
|
|
7
7
|
import os
|
|
8
8
|
import uuid
|
|
9
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)
|
|
10
22
|
|
|
11
23
|
def nextUuid():
|
|
12
24
|
return str(uuid.uuid4())
|
|
File without changes
|