radboy 0.0.805__py3-none-any.whl → 0.0.806__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/GEMINI.py +146 -0
- radboy/TasksMode/Tasks.py +36 -0
- radboy/TasksMode/__pycache__/Tasks.cpython-313.pyc +0 -0
- radboy/__init__.py +1 -1
- radboy/__pycache__/__init__.cpython-313.pyc +0 -0
- {radboy-0.0.805.dist-info → radboy-0.0.806.dist-info}/METADATA +1 -1
- {radboy-0.0.805.dist-info → radboy-0.0.806.dist-info}/RECORD +9 -8
- {radboy-0.0.805.dist-info → radboy-0.0.806.dist-info}/WHEEL +0 -0
- {radboy-0.0.805.dist-info → radboy-0.0.806.dist-info}/top_level.txt +0 -0
radboy/DB/GEMINI.py
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
'''Everything in this file is generated by an AI, not me'''
|
|
2
|
+
|
|
3
|
+
import math
|
|
4
|
+
from typing import Optional
|
|
5
|
+
|
|
6
|
+
class GEMINI_SequencePredictor:
|
|
7
|
+
"""
|
|
8
|
+
Analyzes the specific sequence [1.25, 3, 4, 5, 7, 10, ..., 20].
|
|
9
|
+
|
|
10
|
+
The class generates the full finite sequence and provides a method to find
|
|
11
|
+
the next value in the sequence based on an arbitrary input 'x', including
|
|
12
|
+
extrapolation if 'x' exceeds the defined sequence limit (20.0).
|
|
13
|
+
"""
|
|
14
|
+
def __init__(self):
|
|
15
|
+
"""
|
|
16
|
+
Generates the complete sequence, which is stored internally.
|
|
17
|
+
The pattern: differences increase by 1 (+1, +2, +3, ...) starting
|
|
18
|
+
from the 4th term (5), and the sequence is capped at 20.
|
|
19
|
+
"""
|
|
20
|
+
# 1. Initialize with the known starting numbers
|
|
21
|
+
sequence: list[float] = [1.25, 3.0, 4.0]
|
|
22
|
+
current_value = 4.0
|
|
23
|
+
difference = 1 # Initial difference for the pattern (4 + 1 = 5)
|
|
24
|
+
|
|
25
|
+
# 2. Loop to apply the increasing difference pattern up to the limit 20
|
|
26
|
+
while True:
|
|
27
|
+
next_value = current_value + difference
|
|
28
|
+
|
|
29
|
+
# Check the stopping condition: 20 must be the final number.
|
|
30
|
+
if next_value >= 20.0:
|
|
31
|
+
# If 20 is not already the last element, add it and stop.
|
|
32
|
+
if sequence[-1] != 20.0:
|
|
33
|
+
sequence.append(20.0)
|
|
34
|
+
break
|
|
35
|
+
else:
|
|
36
|
+
# Add the number and increment the difference for the next step.
|
|
37
|
+
sequence.append(next_value)
|
|
38
|
+
current_value = next_value
|
|
39
|
+
difference += 1
|
|
40
|
+
|
|
41
|
+
# The final sequence: [1.25, 3.0, 4.0, 5.0, 7.0, 10.0, 14.0, 19.0, 20.0]
|
|
42
|
+
self.sequence = sequence
|
|
43
|
+
# Store the state for extrapolation: The last natural pattern step was 19.0,
|
|
44
|
+
# and the next difference *should* be 6.
|
|
45
|
+
self.last_natural_term = 19.0
|
|
46
|
+
self.next_difference_start = 6.0
|
|
47
|
+
|
|
48
|
+
print(f"Generated Finite Sequence: {self.sequence}")
|
|
49
|
+
|
|
50
|
+
def _extrapolate_next_value(self, input_x: float) -> float:
|
|
51
|
+
"""
|
|
52
|
+
Handles the case where input_x > 20.0 by continuing the sequence pattern
|
|
53
|
+
(difference +1) until the predicted term is greater than input_x.
|
|
54
|
+
"""
|
|
55
|
+
current_val = self.last_natural_term
|
|
56
|
+
difference = self.next_difference_start
|
|
57
|
+
|
|
58
|
+
while True:
|
|
59
|
+
next_val = current_val + difference
|
|
60
|
+
|
|
61
|
+
if next_val > input_x:
|
|
62
|
+
# This is the next theoretical sequence number that follows input_x
|
|
63
|
+
print(f"(Extrapolated Anchor: {current_val} with Diff {difference}, Prediction: {next_val})")
|
|
64
|
+
return next_val
|
|
65
|
+
|
|
66
|
+
current_val = next_val
|
|
67
|
+
difference += 1.0
|
|
68
|
+
|
|
69
|
+
def get_next_sequence_value(self, input_x: float) -> float:
|
|
70
|
+
"""
|
|
71
|
+
Finds the closest match 'c' to 'input_x' in the sequence and returns
|
|
72
|
+
the next value. If 'input_x' is greater than 20.0, it extrapolates the
|
|
73
|
+
sequence pattern to find the prediction.
|
|
74
|
+
|
|
75
|
+
Args:
|
|
76
|
+
input_x (float): The user's arbitrary input number.
|
|
77
|
+
|
|
78
|
+
Returns:
|
|
79
|
+
float: The next value in the sequence after the anchor point.
|
|
80
|
+
"""
|
|
81
|
+
# --- CASE 1: INPUT EXCEEDS THE FINITE SEQUENCE LIMIT (20.0) ---
|
|
82
|
+
if input_x > 20.0:
|
|
83
|
+
print(f"Input {input_x} exceeds the sequence limit (20.0). Entering extrapolation mode.")
|
|
84
|
+
return self._extrapolate_next_value(input_x)
|
|
85
|
+
|
|
86
|
+
# --- CASE 2: INPUT IS WITHIN THE FINITE SEQUENCE (<= 20.0) ---
|
|
87
|
+
|
|
88
|
+
anchor_index = 0
|
|
89
|
+
min_difference = abs(input_x - self.sequence[0])
|
|
90
|
+
|
|
91
|
+
# 1. Find the Anchor Point (closest match in the sequence)
|
|
92
|
+
for i, number in enumerate(self.sequence):
|
|
93
|
+
current_difference = abs(input_x - number)
|
|
94
|
+
|
|
95
|
+
# Tie-breaker logic: Use "<=" to favor the larger number.
|
|
96
|
+
if current_difference < min_difference:
|
|
97
|
+
min_difference = current_difference
|
|
98
|
+
anchor_index = i
|
|
99
|
+
elif current_difference == min_difference:
|
|
100
|
+
# Explicitly ensure the larger value is chosen in case of a tie
|
|
101
|
+
if number > self.sequence[anchor_index]:
|
|
102
|
+
anchor_index = i
|
|
103
|
+
|
|
104
|
+
# 2. Determine the Next Value
|
|
105
|
+
|
|
106
|
+
anchor_value = self.sequence[anchor_index]
|
|
107
|
+
print(f"Input {input_x} anchors at {anchor_value} (Index {anchor_index}).")
|
|
108
|
+
|
|
109
|
+
# If the anchor is the last element (20.0), return 20.0 as the "next"
|
|
110
|
+
# since the finite list ends here.
|
|
111
|
+
if anchor_index == len(self.sequence) - 1:
|
|
112
|
+
print("Anchor is the final term. Returning the final term.")
|
|
113
|
+
return anchor_value
|
|
114
|
+
else:
|
|
115
|
+
# Otherwise, return the element at the next index
|
|
116
|
+
next_value = self.sequence[anchor_index + 1]
|
|
117
|
+
return next_value
|
|
118
|
+
|
|
119
|
+
# --- Example Usage ---
|
|
120
|
+
'''
|
|
121
|
+
if __name__ == "__main__":
|
|
122
|
+
predictor = SequencePredictor()
|
|
123
|
+
print("\n--- Next Value Predictions ---")
|
|
124
|
+
|
|
125
|
+
# Example 1: Standard case (Input 7.0)
|
|
126
|
+
input1 = 7.0
|
|
127
|
+
next1 = predictor.get_next_sequence_value(input1)
|
|
128
|
+
print(f"Next value after {input1} is: {next1}\n") # Expected: 10.0 (Anchors at 7.0)
|
|
129
|
+
|
|
130
|
+
# Example 2: Extrapolation Case 1 (Input 21.0 > 20.0)
|
|
131
|
+
# Theoretical sequence continues: 19 + 6 = 25. Since 25 > 21, the prediction is 25.
|
|
132
|
+
input2 = 21.0
|
|
133
|
+
next2 = predictor.get_next_sequence_value(input2)
|
|
134
|
+
print(f"Next value after {input2} is: {next2}\n") # Expected: 25.0
|
|
135
|
+
|
|
136
|
+
# Example 3: Extrapolation Case 2 (Input 26.0)
|
|
137
|
+
# Theoretical sequence continues: 19 + 6 = 25. 25 < 26. Next step: 25 + 7 = 32.
|
|
138
|
+
input3 = 26.0
|
|
139
|
+
next3 = predictor.get_next_sequence_value(input3)
|
|
140
|
+
print(f"Next value after {input3} is: {next3}\n") # Expected: 32.0
|
|
141
|
+
|
|
142
|
+
# Example 4: Edge Case (Input 19.5 - Closest to 20.0)
|
|
143
|
+
input4 = 19.5
|
|
144
|
+
next4 = predictor.get_next_sequence_value(input4)
|
|
145
|
+
print(f"Next value after {input4} is: {next4}\n") # Expected: 20.0 (Anchors at 20.0)
|
|
146
|
+
'''
|
radboy/TasksMode/Tasks.py
CHANGED
|
@@ -51,6 +51,8 @@ from radboy.DB.SimpleScanner import SimpleScanner
|
|
|
51
51
|
from radboy.DB.NW.NetWorth import *
|
|
52
52
|
from decimal import Decimal as DEC
|
|
53
53
|
from radboy.DB.lsToday import *
|
|
54
|
+
from radboy.DB.GEMINI import *
|
|
55
|
+
|
|
54
56
|
def today():
|
|
55
57
|
dt=datetime.now()
|
|
56
58
|
return date(dt.year,dt.month,dt.day)
|
|
@@ -904,6 +906,35 @@ SALES TAX ON APPLICABLE TANGIBLE ITEMS = (PRICE + CRV) * TTL TAX RATE
|
|
|
904
906
|
print(e)
|
|
905
907
|
return result
|
|
906
908
|
|
|
909
|
+
def dollar_tree_multiprices_GEMINI():
|
|
910
|
+
zta=GEMINI_SequencePredictor()
|
|
911
|
+
prices=list(set([zta.get_next_sequence_value(i) for i in range(-5,20)]))
|
|
912
|
+
prices.insert(0,1.25)
|
|
913
|
+
htext=[]
|
|
914
|
+
cta=len(prices)
|
|
915
|
+
for num,i in enumerate(prices):
|
|
916
|
+
htext.append(std_colorize(i,num,cta))
|
|
917
|
+
|
|
918
|
+
htext='\n'.join(htext)
|
|
919
|
+
while True:
|
|
920
|
+
try:
|
|
921
|
+
print(htext)
|
|
922
|
+
idx=Control(func=FormBuilderMkText,ptext=f"which price's index[0({Fore.orange_red_1}d=default{Fore.light_yellow})]?",helpText=f"{htext}\nan integer between 0 and {cta-1}",data="integer")
|
|
923
|
+
if idx is None:
|
|
924
|
+
return None
|
|
925
|
+
elif idx in ['d',]:
|
|
926
|
+
return prices[0]
|
|
927
|
+
|
|
928
|
+
if idx in range(0,cta):
|
|
929
|
+
return prices[idx]
|
|
930
|
+
else:
|
|
931
|
+
print(f"{Fore.orange_red_1}use a number within 0-{cta-1}!")
|
|
932
|
+
continue
|
|
933
|
+
|
|
934
|
+
except Exception as e:
|
|
935
|
+
print(e)
|
|
936
|
+
return result
|
|
937
|
+
|
|
907
938
|
def tax_rate_from_oldPriceAndNewPrice():
|
|
908
939
|
result=None
|
|
909
940
|
print('tax_rate_from_oldPriceAndNewPrice()')
|
|
@@ -993,6 +1024,11 @@ SALES TAX ON APPLICABLE TANGIBLE ITEMS = (PRICE + CRV) * TTL TAX RATE
|
|
|
993
1024
|
'desc':f'{Fore.light_yellow}Dollar($tree) Tree {Fore.medium_violet_red}multi-price selector{Style.reset}',
|
|
994
1025
|
'exec':dollar_tree_multiprices
|
|
995
1026
|
},
|
|
1027
|
+
f'{uuid1()}':{
|
|
1028
|
+
'cmds':generate_cmds(startcmd=['dt g','dollar tree gemini','$tree gmni','dollar-tree-gemini'],endCmd=['prcs','prices','prces','mpc',]),
|
|
1029
|
+
'desc':f'{Fore.light_yellow}Dollar($tree) Tree {Fore.medium_violet_red}multi-price selector ; {Fore.orange_red_1}This bit was generated using GOOGLE GEMINI.{Style.reset}',
|
|
1030
|
+
'exec':dollar_tree_multiprices_GEMINI
|
|
1031
|
+
},
|
|
996
1032
|
f'{uuid1()}':{
|
|
997
1033
|
'cmds':generate_cmds(startcmd=['salary','sal','slry'],endCmd=['2hours','2hr','tohr','tohour','-hour','-hr']),
|
|
998
1034
|
'desc':f'{Fore.light_yellow}Annual Salary{Fore.medium_violet_red} from hourly wage rate and hours worked{Style.reset}',
|
|
Binary file
|
radboy/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION='0.0.
|
|
1
|
+
VERSION='0.0.806'
|
|
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=h30zoTqt-XLt_afDPlxMxBiKKwmKi3N-yAuldNCqXUo,41476
|
|
7
7
|
radboy/Run.py,sha256=JUoCTHnzQBv7n8PB2_i93ANdAC_iW__RkAge8esCnk4,76
|
|
8
|
-
radboy/__init__.py,sha256=
|
|
8
|
+
radboy/__init__.py,sha256=LUDAFYzhZ2L9T3DqORKKF4zG74U_PiEHL4Z2W7ep_DI,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
|
|
@@ -83,6 +83,7 @@ radboy/DB/DatePicker.py,sha256=B75mDtXQrkHRCpoU9TJsaBVvkK37ykMaJyaiqGOo4dM,18334
|
|
|
83
83
|
radboy/DB/DisplayItemDb.py,sha256=uVvrNyFyBuKvrw-BEPXKYvfa-QWyFN5ahESi2l6vUUA,52046
|
|
84
84
|
radboy/DB/EstimatedPayCalendarWorkSheet.txt,sha256=GOjRSmGxFoNTdAnpPe2kGv7CkXDrh0Mee01HslamGbo,17173
|
|
85
85
|
radboy/DB/ExerciseTracker.py,sha256=hs_RG7YWFsu8KYkMe2PIKtTyxl9MzbnWXuTCXffF3K8,38219
|
|
86
|
+
radboy/DB/GEMINI.py,sha256=kN75rQuCkDq6IgnXTNPWyxGtRulO68qf5RdP-eJj3kc,6057
|
|
86
87
|
radboy/DB/LetterWriter.py,sha256=0B14GB-hJK2Xf_TFASriOELFygiI1LwkSb__R3tUiU0,2631
|
|
87
88
|
radboy/DB/OrderedAndRxd.py,sha256=v_vrTOiTDhKqT5KErK6MOG_u4Nt7ug2MoLTHvAnm88M,19450
|
|
88
89
|
radboy/DB/PayDay.py,sha256=H2kPGvBCDkMOz7lbxQhYtUt_oAInpxi37Q6MFrah98I,8710
|
|
@@ -356,7 +357,7 @@ radboy/SystemSettings/__pycache__/__init__.cpython-312.pyc,sha256=aIzp4Po0t8EhSA
|
|
|
356
357
|
radboy/SystemSettings/__pycache__/__init__.cpython-313.pyc,sha256=QFDuoidxMWsGVLsy5lN-rDs6TP8nKJ4yyCyiamNOhwo,156
|
|
357
358
|
radboy/TasksMode/ReFormula.py,sha256=REDRJYub-OEOE6g14oRQOLOQwv8pHqVJy4NQk3CCM90,2255
|
|
358
359
|
radboy/TasksMode/SetEntryNEU.py,sha256=mkV9zAZe0lfpu_3coMuIILEzh6PgCNi7g9lJ4yDUpYM,20596
|
|
359
|
-
radboy/TasksMode/Tasks.py,sha256=
|
|
360
|
+
radboy/TasksMode/Tasks.py,sha256=4j3OGM-s-Vg63HbEX2CnAarzKcFv475_hljXBZA_El4,381079
|
|
360
361
|
radboy/TasksMode/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
361
362
|
radboy/TasksMode/__pycache__/ReFormula.cpython-311.pyc,sha256=QEG3PwVw-8HTd_Mf9XbVcxU56F1fC9yBqWXYPLC39DU,4865
|
|
362
363
|
radboy/TasksMode/__pycache__/ReFormula.cpython-312.pyc,sha256=aX7BWm2PPjCTnxsbGUitR-2h9hq4AjaBiHMrUXvIl0Y,3967
|
|
@@ -365,7 +366,7 @@ radboy/TasksMode/__pycache__/SetEntryNEU.cpython-312.pyc,sha256=pCdFj61aPKkHL6Sv
|
|
|
365
366
|
radboy/TasksMode/__pycache__/SetEntryNEU.cpython-313.pyc,sha256=jMSrUX9pvEhf67uVwrPE2ZlBCems8V7tHJ1LcC15ovU,24603
|
|
366
367
|
radboy/TasksMode/__pycache__/Tasks.cpython-311.pyc,sha256=6QOTJnLiXSKdF81hkhy3vyrz49PPhS20s5_0X52g3Hw,131120
|
|
367
368
|
radboy/TasksMode/__pycache__/Tasks.cpython-312.pyc,sha256=hyJwdaYaaRLdcrNxgg36diJ5iijX5_3I0UAORsj-6LU,310295
|
|
368
|
-
radboy/TasksMode/__pycache__/Tasks.cpython-313.pyc,sha256=
|
|
369
|
+
radboy/TasksMode/__pycache__/Tasks.cpython-313.pyc,sha256=p33x1LWn97JFHcnaeqpAx3gejYT25Q5i_80H7qCxqbY,454684
|
|
369
370
|
radboy/TasksMode/__pycache__/__init__.cpython-311.pyc,sha256=PKV1JbihEacm639b53bZozRQvcllSkjGP3q8STVMxF4,234
|
|
370
371
|
radboy/TasksMode/__pycache__/__init__.cpython-312.pyc,sha256=ERgnEvRMiGSecWp1BpNzLdSq_SdKw7GvFWUvUM7bLVw,272
|
|
371
372
|
radboy/TasksMode/__pycache__/__init__.cpython-313.pyc,sha256=lvsTxukyvGKB3C0rdF9dQi_bvVh6ceDVINfwcuIsd0s,151
|
|
@@ -412,7 +413,7 @@ radboy/__pycache__/Run.cpython-311.pyc,sha256=G_UEfMtkLRjR6ZpGA_BJzGenuaCcP469Y9
|
|
|
412
413
|
radboy/__pycache__/Run.cpython-312.pyc,sha256=v4xolc3mHyla991XhpYBUbBHYT0bnJ1gE-lkFoQ4GFA,241
|
|
413
414
|
radboy/__pycache__/__init__.cpython-311.pyc,sha256=R-DVbUioMOW-Fnaq7FpT5F1a5p0q3b_RW-HpLRArCAY,242
|
|
414
415
|
radboy/__pycache__/__init__.cpython-312.pyc,sha256=FsFzLXOlTK8_7ixoPZzakkR8Wibt-DvXLFh-oG2QlPw,164
|
|
415
|
-
radboy/__pycache__/__init__.cpython-313.pyc,sha256=
|
|
416
|
+
radboy/__pycache__/__init__.cpython-313.pyc,sha256=kMG1ClFxW3TIUbSY1sWrkqDu9DLix6d3-Ici6Cgugmg,165
|
|
416
417
|
radboy/__pycache__/__init__.cpython-39.pyc,sha256=D48T6x6FUeKPfubo0sdS_ZUut3FmBvPMP7qT6rYBZzU,275
|
|
417
418
|
radboy/__pycache__/possibleCode.cpython-311.pyc,sha256=zFiHyzqD8gUnIWu4vtyMYIBposiRQqaRXfcT_fOl4rU,20882
|
|
418
419
|
radboy/__pycache__/possibleCode.cpython-312.pyc,sha256=tk_CO-AcsO3YZj5j6vEsw3g37UmEzWc5YgeWEoJEUg4,27922
|
|
@@ -440,7 +441,7 @@ radboy/tkGui/Images/__pycache__/__init__.cpython-311.pyc,sha256=tXBYpqbOlZ24B1BI
|
|
|
440
441
|
radboy/tkGui/__pycache__/BeginnersLuck.cpython-311.pyc,sha256=xLQOnV1wuqHGaub16mPX0dDMGU9ryCeLtNz5e517_GE,3004
|
|
441
442
|
radboy/tkGui/__pycache__/Review.cpython-311.pyc,sha256=wKq24iM6Xe2OampgZ7-8U6Nvmgs2y-qWOrGwtWhc75k,4047
|
|
442
443
|
radboy/tkGui/__pycache__/__init__.cpython-311.pyc,sha256=BX7DBn5qbvKTvlrKOP5gzTBPBTeTgSMjBW6EMl7N8e0,230
|
|
443
|
-
radboy-0.0.
|
|
444
|
-
radboy-0.0.
|
|
445
|
-
radboy-0.0.
|
|
446
|
-
radboy-0.0.
|
|
444
|
+
radboy-0.0.806.dist-info/METADATA,sha256=dR5EI49_jQSytU2s12xnHHed2IjLFtx1PdMZdQ7mF6c,1920
|
|
445
|
+
radboy-0.0.806.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
446
|
+
radboy-0.0.806.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
|
|
447
|
+
radboy-0.0.806.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|