radboy 0.0.589__py3-none-any.whl → 0.0.590__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.
Potentially problematic release.
This version of radboy might be problematic. Click here for more details.
- radboy/DB/__pycache__/db.cpython-313.pyc +0 -0
- radboy/DB/db.py +1 -96
- radboy/DB/types.py +96 -0
- radboy/__init__.py +1 -1
- radboy/__pycache__/__init__.cpython-313.pyc +0 -0
- {radboy-0.0.589.dist-info → radboy-0.0.590.dist-info}/METADATA +1 -1
- {radboy-0.0.589.dist-info → radboy-0.0.590.dist-info}/RECORD +9 -8
- {radboy-0.0.589.dist-info → radboy-0.0.590.dist-info}/WHEEL +0 -0
- {radboy-0.0.589.dist-info → radboy-0.0.590.dist-info}/top_level.txt +0 -0
|
Binary file
|
radboy/DB/db.py
CHANGED
|
@@ -49,7 +49,7 @@ from barcode.writer import ImageWriter
|
|
|
49
49
|
import hashlib
|
|
50
50
|
import base64
|
|
51
51
|
from decimal import Decimal as TDecimal,getcontext
|
|
52
|
-
|
|
52
|
+
from radboy.DB.types import *
|
|
53
53
|
getcontext().prec=4
|
|
54
54
|
|
|
55
55
|
import scipy
|
|
@@ -59,101 +59,6 @@ def invalidRepeaters():
|
|
|
59
59
|
mp.extend([f'{im}'*i for i in range(os.get_terminal_size().columns)])
|
|
60
60
|
return mp
|
|
61
61
|
|
|
62
|
-
class decc(TDecimal):
|
|
63
|
-
''' defines a decimal of 'cf\''''
|
|
64
|
-
def __new__(self,value,cf=3):
|
|
65
|
-
'''you can set the floating precision of a value in curly braces {value:.3f} by doing {value:{three}f} where three is he variable containting the value 3
|
|
66
|
-
used for precision
|
|
67
|
-
|
|
68
|
-
value=1.234
|
|
69
|
-
cf=2
|
|
70
|
-
result=1.23
|
|
71
|
-
for the below assignment.
|
|
72
|
-
|
|
73
|
-
value=f"{value:.{cf}f}"
|
|
74
|
-
print(value)
|
|
75
|
-
'''
|
|
76
|
-
|
|
77
|
-
value=f"{value:.{cf}f}"
|
|
78
|
-
return super().__new__(self,value)
|
|
79
|
-
|
|
80
|
-
class dec3(TDecimal):
|
|
81
|
-
''' defines a decimal of .3f'''
|
|
82
|
-
def __new__(self,value):
|
|
83
|
-
value=f"{value:.3f}"
|
|
84
|
-
return super().__new__(self,value)
|
|
85
|
-
|
|
86
|
-
class dec2(TDecimal):
|
|
87
|
-
''' defines a decimal of .2f'''
|
|
88
|
-
def __new__(self,value):
|
|
89
|
-
value=f"{value:.3f}"
|
|
90
|
-
return super().__new__(self,value)
|
|
91
|
-
|
|
92
|
-
class dec1(TDecimal):
|
|
93
|
-
''' defines a decimal of .1f'''
|
|
94
|
-
def __new__(self,value):
|
|
95
|
-
value=f"{value:.3f}"
|
|
96
|
-
return super().__new__(self,value)
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
class stre(str):
|
|
100
|
-
'''String Extended to include operators for some useful functionality.'''
|
|
101
|
-
def __invert__(self):
|
|
102
|
-
'''Generate a 512 Hex Digest for self'''
|
|
103
|
-
hl=hashlib.sha512()
|
|
104
|
-
hl.update(self.encode())
|
|
105
|
-
return str(hl.hexdigest())
|
|
106
|
-
|
|
107
|
-
def __sub__(self,other):
|
|
108
|
-
'''remove this many characters from the string, where a positive removes from the right and a negative removes from the left'''
|
|
109
|
-
if isinstance(other,int) or isinstance(other,float):
|
|
110
|
-
#print(other<0)
|
|
111
|
-
if other < 0:
|
|
112
|
-
return self[:other]
|
|
113
|
-
elif other > 0:
|
|
114
|
-
m=[self[i:i+1] for i in range(0,len(self),int(1))]
|
|
115
|
-
for i in range(0,other):
|
|
116
|
-
popped=m.pop(0)
|
|
117
|
-
return ''.join(m)
|
|
118
|
-
else:
|
|
119
|
-
raise NotImplemented
|
|
120
|
-
|
|
121
|
-
def __truediv__(self,other):
|
|
122
|
-
'''return a list broken into chunks of other'''
|
|
123
|
-
if isinstance(other,int) or isinstance(other,float):
|
|
124
|
-
return [self[i:i+other] for i in range(0,len(self),int(other))]
|
|
125
|
-
else:
|
|
126
|
-
raise NotImplemented
|
|
127
|
-
|
|
128
|
-
def __mod__(self,other):
|
|
129
|
-
#return the number of chunks
|
|
130
|
-
if isinstance(other,int) or isinstance(other,float):
|
|
131
|
-
|
|
132
|
-
return len([self[i:i+other] for i in range(0,len(self),int(other))])
|
|
133
|
-
else:
|
|
134
|
-
raise NotImplemented
|
|
135
|
-
|
|
136
|
-
def __floordiv__(self,other):
|
|
137
|
-
'''reverse of __truediv__'''
|
|
138
|
-
if isinstance(other,int) or isinstance(other,float):
|
|
139
|
-
|
|
140
|
-
return [ii for ii in reversed([self[i:i+other] for i in range(0,len(self),int(other))])]
|
|
141
|
-
|
|
142
|
-
else:
|
|
143
|
-
raise NotImplemented
|
|
144
|
-
|
|
145
|
-
def __pow__(self,other):
|
|
146
|
-
'''generate a random string from self of length other.'''
|
|
147
|
-
|
|
148
|
-
if isinstance(other,int) or isinstance(other,float):
|
|
149
|
-
|
|
150
|
-
src=[self[i:i+1] for i in range(0,len(self),int(1))]
|
|
151
|
-
end=''.join(random.choices(src,k=int(abs(other))))[:int(abs(other))]
|
|
152
|
-
while (len(end) < other) or (len(end) > other):
|
|
153
|
-
end=''.join(random.choices(src,k=int(abs(other))))[:int(abs(other))]
|
|
154
|
-
return end
|
|
155
|
-
else:
|
|
156
|
-
raise NotImplemented
|
|
157
62
|
|
|
158
63
|
import builtins
|
|
159
64
|
builtins.stre=stre
|
radboy/DB/types.py
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
from decimal import Decimal as TDecimal,getcontext
|
|
2
|
+
class decc(TDecimal):
|
|
3
|
+
''' defines a decimal of 'cf\''''
|
|
4
|
+
def __new__(self,value,cf=3):
|
|
5
|
+
'''you can set the floating precision of a value in curly braces {value:.3f} by doing {value:{three}f} where three is he variable containting the value 3
|
|
6
|
+
used for precision
|
|
7
|
+
|
|
8
|
+
value=1.234
|
|
9
|
+
cf=2
|
|
10
|
+
result=1.23
|
|
11
|
+
for the below assignment.
|
|
12
|
+
|
|
13
|
+
value=f"{value:.{cf}f}"
|
|
14
|
+
print(value)
|
|
15
|
+
'''
|
|
16
|
+
|
|
17
|
+
value=f"{value:.{cf}f}"
|
|
18
|
+
return super().__new__(self,value)
|
|
19
|
+
|
|
20
|
+
class dec3(TDecimal):
|
|
21
|
+
''' defines a decimal of .3f'''
|
|
22
|
+
def __new__(self,value):
|
|
23
|
+
value=f"{value:.3f}"
|
|
24
|
+
return super().__new__(self,value)
|
|
25
|
+
|
|
26
|
+
class dec2(TDecimal):
|
|
27
|
+
''' defines a decimal of .2f'''
|
|
28
|
+
def __new__(self,value):
|
|
29
|
+
value=f"{value:.3f}"
|
|
30
|
+
return super().__new__(self,value)
|
|
31
|
+
|
|
32
|
+
class dec1(TDecimal):
|
|
33
|
+
''' defines a decimal of .1f'''
|
|
34
|
+
def __new__(self,value):
|
|
35
|
+
value=f"{value:.3f}"
|
|
36
|
+
return super().__new__(self,value)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class stre(str):
|
|
40
|
+
'''String Extended to include operators for some useful functionality.'''
|
|
41
|
+
def __invert__(self):
|
|
42
|
+
'''Generate a 512 Hex Digest for self'''
|
|
43
|
+
hl=hashlib.sha512()
|
|
44
|
+
hl.update(self.encode())
|
|
45
|
+
return str(hl.hexdigest())
|
|
46
|
+
|
|
47
|
+
def __sub__(self,other):
|
|
48
|
+
'''remove this many characters from the string, where a positive removes from the right and a negative removes from the left'''
|
|
49
|
+
if isinstance(other,int) or isinstance(other,float):
|
|
50
|
+
#print(other<0)
|
|
51
|
+
if other < 0:
|
|
52
|
+
return self[:other]
|
|
53
|
+
elif other > 0:
|
|
54
|
+
m=[self[i:i+1] for i in range(0,len(self),int(1))]
|
|
55
|
+
for i in range(0,other):
|
|
56
|
+
popped=m.pop(0)
|
|
57
|
+
return ''.join(m)
|
|
58
|
+
else:
|
|
59
|
+
raise NotImplemented
|
|
60
|
+
|
|
61
|
+
def __truediv__(self,other):
|
|
62
|
+
'''return a list broken into chunks of other'''
|
|
63
|
+
if isinstance(other,int) or isinstance(other,float):
|
|
64
|
+
return [self[i:i+other] for i in range(0,len(self),int(other))]
|
|
65
|
+
else:
|
|
66
|
+
raise NotImplemented
|
|
67
|
+
|
|
68
|
+
def __mod__(self,other):
|
|
69
|
+
#return the number of chunks
|
|
70
|
+
if isinstance(other,int) or isinstance(other,float):
|
|
71
|
+
|
|
72
|
+
return len([self[i:i+other] for i in range(0,len(self),int(other))])
|
|
73
|
+
else:
|
|
74
|
+
raise NotImplemented
|
|
75
|
+
|
|
76
|
+
def __floordiv__(self,other):
|
|
77
|
+
'''reverse of __truediv__'''
|
|
78
|
+
if isinstance(other,int) or isinstance(other,float):
|
|
79
|
+
|
|
80
|
+
return [ii for ii in reversed([self[i:i+other] for i in range(0,len(self),int(other))])]
|
|
81
|
+
|
|
82
|
+
else:
|
|
83
|
+
raise NotImplemented
|
|
84
|
+
|
|
85
|
+
def __pow__(self,other):
|
|
86
|
+
'''generate a random string from self of length other.'''
|
|
87
|
+
|
|
88
|
+
if isinstance(other,int) or isinstance(other,float):
|
|
89
|
+
|
|
90
|
+
src=[self[i:i+1] for i in range(0,len(self),int(1))]
|
|
91
|
+
end=''.join(random.choices(src,k=int(abs(other))))[:int(abs(other))]
|
|
92
|
+
while (len(end) < other) or (len(end) > other):
|
|
93
|
+
end=''.join(random.choices(src,k=int(abs(other))))[:int(abs(other))]
|
|
94
|
+
return end
|
|
95
|
+
else:
|
|
96
|
+
raise NotImplemented
|
radboy/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION='0.0.
|
|
1
|
+
VERSION='0.0.590'
|
|
Binary file
|
|
@@ -5,7 +5,7 @@ radboy/Holidays.txt,sha256=y-JZPihh5iaWKxMIHNXD39yVuVmf1vMs4FdNDcg0f1Y,3114
|
|
|
5
5
|
radboy/InventoryGlossary.txt,sha256=018-Yqca6DFb10jPdkUY-5qhkRlQN1k3rxoTaERQ-LA,91008
|
|
6
6
|
radboy/RecordMyCodes.py,sha256=Lt2reA6xchq3U7Y08DvkrHboZ25i1ts7X2E9gSIwcVg,41101
|
|
7
7
|
radboy/Run.py,sha256=JUoCTHnzQBv7n8PB2_i93ANdAC_iW__RkAge8esCnk4,76
|
|
8
|
-
radboy/__init__.py,sha256=
|
|
8
|
+
radboy/__init__.py,sha256=DDzsxVj4IIyHUwu0MJDfyk-RA7XpbeJJhnH2fXrNsdI,17
|
|
9
9
|
radboy/api_key,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
radboy/case-export-2024-05-14-13-10-00.672971.xlsx,sha256=Wd592d_VLFmfUI9KKKSVjNwjV91euc1T7ATyvwvUhlg,5431
|
|
11
11
|
radboy/case-export-2024-05-14-13-13-22.540614.xlsx,sha256=OnGrhmScHfGp_mVaWW-LNMsqrQgyZDpiU3wV-2s3U5Q,5556
|
|
@@ -93,12 +93,13 @@ radboy/DB/SMLabelImporter.py,sha256=eUoBDxVUUEKGL2g_PwkASM67ZB7FmXtSnn4bCagskhY,
|
|
|
93
93
|
radboy/DB/__init__.py,sha256=JiigA9B7GalP7YuRdcwyGDu5PDSBahoi0lLjtScxlN8,49
|
|
94
94
|
radboy/DB/blankDataFile.py,sha256=YX_05Usi71UpDkZN9UTMYwUipbTndTAtEgqzBEga0kE,9285
|
|
95
95
|
radboy/DB/config.py,sha256=bvu43dUl1_yO3Zq3gsLuenGUgJSiS3S9Cs6ppFEvZbg,239
|
|
96
|
-
radboy/DB/db.py,sha256=
|
|
96
|
+
radboy/DB/db.py,sha256=QrtzNjwxORcstYoCPqL3SVR4h3tXu4sVMkQYTm6upkE,253365
|
|
97
97
|
radboy/DB/glossary_db.py,sha256=1_qxeEpjjEtpWB_eDjsgJisimLv7OBm75MuqM-Lt6zg,28218
|
|
98
98
|
radboy/DB/masterLookup.py,sha256=DBaM2uscG3_X5dek49wjdnOzhrjWhKgvOEz_umdz0mY,4566
|
|
99
99
|
radboy/DB/msg.txt,sha256=YxWed6A6tuP1djJ5QPS2Rz3ING4TKKf8kUiCCPtzHXE,7937
|
|
100
100
|
radboy/DB/renderText2Png.py,sha256=PWnTicLTfOPg9UlQYia3wMpjM9rh7MIyDVsmcsDRUBo,5678
|
|
101
101
|
radboy/DB/testClass.py,sha256=t3zT1gbvReUncnPY8R9JUfKXQ5UEB2wmQx8DNeds0hI,310
|
|
102
|
+
radboy/DB/types.py,sha256=ULH1SGiOvUAyhf4bO6Q-WRD_IM78S91k8DGXqVUehmQ,3224
|
|
102
103
|
radboy/DB/__pycache__/DatePicker.cpython-311.pyc,sha256=VMJnJ7scb4VHMQi1HDZCF67KVYfb9m-fZK96IAoJzTQ,19676
|
|
103
104
|
radboy/DB/__pycache__/DatePicker.cpython-312.pyc,sha256=cc5XWJ6Sbtcg0xWPz3SOP93VceIqr1pH42kjkLl5iYs,30294
|
|
104
105
|
radboy/DB/__pycache__/DatePicker.cpython-313.pyc,sha256=jV__j5ER1oshsenGPynR0UNHWMI7VStgyw73-iLKxzg,33993
|
|
@@ -128,7 +129,7 @@ radboy/DB/__pycache__/config.cpython-312.pyc,sha256=Qo7E6MHrF6yqvKgepNFyCoekZXiv
|
|
|
128
129
|
radboy/DB/__pycache__/config.cpython-313.pyc,sha256=_8wCIg_3jhyJjxnExD2Sm6aY-uZTw036p7Ki5znL7dc,376
|
|
129
130
|
radboy/DB/__pycache__/db.cpython-311.pyc,sha256=rNgigyBd0D-cg1JxKAS8t0B_k0IEJivgVlRaZE10Xis,210105
|
|
130
131
|
radboy/DB/__pycache__/db.cpython-312.pyc,sha256=ANDJPC0RoavbmSKFxG15vC7B4rEGyVt7xRJt7XGY3OA,334609
|
|
131
|
-
radboy/DB/__pycache__/db.cpython-313.pyc,sha256=
|
|
132
|
+
radboy/DB/__pycache__/db.cpython-313.pyc,sha256=PFT0oWgelb2O5vX14zPjFVkaGLAqwIdbdyLTroAMpNg,398193
|
|
132
133
|
radboy/DB/__pycache__/glossary_db.cpython-312.pyc,sha256=8UL-29cKqtKovx0BANm6kzKKteef1BW_2qF3wumzst4,36023
|
|
133
134
|
radboy/DB/__pycache__/glossary_db.cpython-313.pyc,sha256=Ke9bkvllGv5CK0JdT9DRvQ3MOdrXxoYv7TVLNkqLux0,36582
|
|
134
135
|
radboy/DB/__pycache__/masterLookup.cpython-312.pyc,sha256=bQiOkmMwwHgcO18tYSWGQ-YUff4GQlKVhBMp1GoWAqY,6324
|
|
@@ -399,7 +400,7 @@ radboy/__pycache__/Run.cpython-311.pyc,sha256=G_UEfMtkLRjR6ZpGA_BJzGenuaCcP469Y9
|
|
|
399
400
|
radboy/__pycache__/Run.cpython-312.pyc,sha256=v4xolc3mHyla991XhpYBUbBHYT0bnJ1gE-lkFoQ4GFA,241
|
|
400
401
|
radboy/__pycache__/__init__.cpython-311.pyc,sha256=R-DVbUioMOW-Fnaq7FpT5F1a5p0q3b_RW-HpLRArCAY,242
|
|
401
402
|
radboy/__pycache__/__init__.cpython-312.pyc,sha256=FsFzLXOlTK8_7ixoPZzakkR8Wibt-DvXLFh-oG2QlPw,164
|
|
402
|
-
radboy/__pycache__/__init__.cpython-313.pyc,sha256=
|
|
403
|
+
radboy/__pycache__/__init__.cpython-313.pyc,sha256=3WqQcaMj7gCyX9QNzXNiCN9wWO030gkgMPr5Dwx98gc,165
|
|
403
404
|
radboy/__pycache__/__init__.cpython-39.pyc,sha256=D48T6x6FUeKPfubo0sdS_ZUut3FmBvPMP7qT6rYBZzU,275
|
|
404
405
|
radboy/__pycache__/possibleCode.cpython-311.pyc,sha256=zFiHyzqD8gUnIWu4vtyMYIBposiRQqaRXfcT_fOl4rU,20882
|
|
405
406
|
radboy/__pycache__/possibleCode.cpython-312.pyc,sha256=tk_CO-AcsO3YZj5j6vEsw3g37UmEzWc5YgeWEoJEUg4,27922
|
|
@@ -427,7 +428,7 @@ radboy/tkGui/Images/__pycache__/__init__.cpython-311.pyc,sha256=tXBYpqbOlZ24B1BI
|
|
|
427
428
|
radboy/tkGui/__pycache__/BeginnersLuck.cpython-311.pyc,sha256=xLQOnV1wuqHGaub16mPX0dDMGU9ryCeLtNz5e517_GE,3004
|
|
428
429
|
radboy/tkGui/__pycache__/Review.cpython-311.pyc,sha256=wKq24iM6Xe2OampgZ7-8U6Nvmgs2y-qWOrGwtWhc75k,4047
|
|
429
430
|
radboy/tkGui/__pycache__/__init__.cpython-311.pyc,sha256=BX7DBn5qbvKTvlrKOP5gzTBPBTeTgSMjBW6EMl7N8e0,230
|
|
430
|
-
radboy-0.0.
|
|
431
|
-
radboy-0.0.
|
|
432
|
-
radboy-0.0.
|
|
433
|
-
radboy-0.0.
|
|
431
|
+
radboy-0.0.590.dist-info/METADATA,sha256=_OukXDzmiupeyRmLx9hwNSMnHZ4sHcbHk1_k1xyKSlc,1662
|
|
432
|
+
radboy-0.0.590.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
433
|
+
radboy-0.0.590.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
|
|
434
|
+
radboy-0.0.590.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|