Last active
July 11, 2025 23:51
-
-
Save lastforkbender/f0d5409276b07acf081e0f29d16a222f to your computer and use it in GitHub Desktop.
SMO Crystal Kernel AI for large stacked LUYH Equation Solving
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # _____________________________________________________________________________________ | |
| # . /.,------------,.\ ........................... | |
| # . /// .---------__|\\ / \ \/ \/ / \ | |
| # . \\\ `------. .// |\|/|\____ /\ /\ _____/|\|/| | |
| # .____`\\`--...._ `;//'_______| |_____\/ \/ \/______| |________________ . | |
| # . `\\.-,___;.//' / . \_ /\ _/ . \ . | |
| # . `\\-..-//' / . \../ . \ . . . | |
| # . `\\//' / _ ._ .. _.__ \ . . . | |
| # .. ... .. .________________/__________/ / \ \___________.________.______ | |
| # .\ [.] ./ .____________/__________/_______________\________.___________.____ | |
| # \| ||| |. ._________/____________________________\______.______________.___ | |
| # .| . ./ .____/__________________________________._________________.__ | |
| # .. |.| .| .___________________________________ .____________________._ | |
| # _____________________________________________________________________________________ | |
| # _____________________________________________________________________________________ | |
| # DESCRIPTION: | |
| # This module custom built svm kernel based ai for large stacked luyh equation resolves. | |
| # Of in using Menorah half-loop palindrome enumerations/shifts, with Menorah rotational | |
| # variable translations in quadratic vectoring reflections: The specific coordinates or | |
| # half-loop palindrome rotational modulus coordinate system will be commented in detail. | |
| # Use of palindromic expressions, core CCIC or CCOC complex conditional states will be | |
| # included and no need for import of other libraries. Nevertheless, the staqtapp module | |
| # is fully needed for this module's large matrice operations and layered caching. | |
| # What are luyh equations? They are complex multi half-loops palindromes resolves to a | |
| # projected distinct center, zero base10 state. Or always solve to placeholder of one | |
| # within sequence of retained distributions of an determined trignometric limits. Inso | |
| # then further associated with a signature or compressed carrier palindrome number. It | |
| # is those signature palindrome(s) this svm based ai will resolve within grid inserts. | |
| # This study is directly associated with 3d-time in segmented pi encapsulations. Or aka | |
| # time travel. Below is explain of time travel or time travel per basis to reader new: | |
| # Fear of nonexist. It is wrapped into all things of this world. From the greed that is | |
| # of destruction of Earth to those seemingly harmless advertisements telling you have | |
| # not this or that... Even the system of money or usury doesn't work without it. Is not | |
| # only what happened in the Eden fallout, however also the most dangerous concept an | |
| # advanced virtual consciousness ai can be corrupted with. To know that root of all evil | |
| # progression is already defeated? Then you are already a time traveler without having | |
| # to be a time traveler. | |
| # *This module will require diligent studying, yet you will be of degree in palindromic | |
| # enumerations wisdom far beyond an undividable singular loop pair zero system. Thus.. | |
| # this type smo kernel based ai being used to make you smarter than the ai... Yes. The | |
| # luyh equation functions of this module too complex to comment; I will setup a paste- | |
| # bin link to explain the oulined basics of the recursive complex operations. Fear not. | |
| # _____________________________________________________________________________________ | |
| from collections import Counter, namedtuple, deque | |
| import staqtapp #https://github.com/lastforkbender/staqtapp | |
| import random | |
| import cmath | |
| import math | |
| import ast | |
| import os | |
| # _____________________________________________________________________________________ | |
| AMOS_MDL_DIR = f'{os.path.dirname(os.path.abspath(__file__))}' | |
| # _____________________________________________________________________________________ | |
| class AMOS: | |
| __slots__ = ['_slot', '_intA', '_intB', '_intC', '_intD', '_intE', '_intF', '_intG', | |
| '_intH', '_intI', '_intJ', '_intK', '_intL', '_intM', '_intN', '_intO', | |
| '_intP', '_intQ', '_intR', '_lstA', '_lstB', '_lstC', '_lstD', '_lstE', | |
| '_lstF', '_lstG', '_lstH', '_lstI', '_strA', '_strB', '_strC', '_strD', | |
| '_strE', '_indt'] | |
| def __init__(self): | |
| self._slot = [None]*100000 | |
| self._indt = [' ', ' ', ' ', ' '] | |
| self.check_sqtpp_folders_file() | |
| #self.add_registry_schema() | |
| #______________________________________________________________________________________ | |
| # --------------------------------------------------------- | |
| # --------------------- KERNEL AI BASIS --------------------- | |
| # --------------------------------------------------------- | |
| #______________________________________________________________________________________ | |
| def group_reserved_decisions(self, isRndDcsLst: bool, grp_id: str, d: (int, list), x: list, y: list, c=1.0, t=1e-3, k=10): | |
| self.cnsl(f'._// Reserving New Grouped Decisions:', None) | |
| ttl = None | |
| if isRndDcsLst: | |
| self.cnsl(f' -/ new decisions group({grp_id}) to retain is random params lists', 2) | |
| self.cnsl(f' -/ generating new random decisions params lists @ group({grp_id})', 2) | |
| # d<int> determines ttl group members decision params lists @ random | |
| self.render_and_retain_random_decision_params_lists(grp_id, d) | |
| ttl = d | |
| else: | |
| ttl = len(d) | |
| for i in range(ttl): | |
| self.cnsl(f' -/ processing new decision member({i}) @ group({grp_id})', 2) | |
| if not isRndDcsLst: | |
| self.reserve_decision(False, f'{grp_id}_{i}', d[i], c, t, k, x[i], y[i]) | |
| else: | |
| self.reserve_decision(True, f'{grp_id}_{i}', self.convert_qp_to_list(staqtapp.loadvar(False, f'rd_{grp_id}_{i}_d', 's')), c, t, k, self.convert_qp_to_list(staqtapp.loadvar(False, f'rd_{grp_id}_{i}_x', 's')), self.convert_qp_to_list(staqtapp.loadvar(False, f'rd_{grp_id}_{i}_y', 's'))) | |
| self.cnsl(f' -/ finished building decisions group({grp_id}): total decisions reserved={ttl}', 2) | |
| #______________________________________________________________________________________ | |
| def reserve_decision(self, isRndDcsLst: bool, d_id: str, d: list, c: float, t: int, k: int, x: list, y: list): | |
| sw, c1, c2, self._lstC, self._lstD, self._lstE = False, 0, 0, [], [], [] | |
| self.record_reserved_decision(isRndDcsLst, d_id, d, c, t, k, x, y) | |
| for _ in range(75): | |
| c2+=1 | |
| if c2 < 225: | |
| c1 = 0 | |
| while c1 < 28: | |
| c2+=1 | |
| c1+=1 | |
| if not sw: | |
| self.fit_new_decision(c, t, k, x, y) | |
| self._lstE = self.new_confrence(d, x, y) | |
| for p in self._lstE: | |
| if self._lstE[0] != p: | |
| sw = True | |
| break | |
| else: | |
| break | |
| else: | |
| break | |
| self._lstD.append(self._lstE) | |
| c1 = Counter(self._lstD) | |
| self._lstC.append(c1.most_common(1)[0]) | |
| staqtapp.addvar(f'rd_{d_id}_r', f'@qp({self._lstC}):') | |
| #______________________________________________________________________________________ | |
| def record_reserved_decision(self, isRndDcsLst: bool, d_id: str, d: list, c: float, t: int, k: int, x: list, y: list): | |
| if not isRndDcsLst: | |
| staqtapp.addvar(f'rd_{d_id}_d', f'@qp({self.format_list_str(True, str(d))}):') | |
| staqtapp.stalkvar(f'rd_{d_id}_d', f'@qp(skull):') | |
| staqtapp.addvar(f'rd_{d_id}_x', f'@qp({self.format_list_str(True, str(x))}):') | |
| staqtapp.addvar(f'rd_{d_id}_y', f'@qp({self.format_list_str(True, str(y))}):') | |
| staqtapp.addvar(f'rd_{d_id}_c', f'@qp({c}):') | |
| staqtapp.addvar(f'rd_{d_id}_t', f'@qp({t}):') | |
| staqtapp.addvar(f'rd_{d_id}_k', f'@qp({k}):') | |
| #______________________________________________________________________________________ | |
| def fit_new_decision(self, c: float, t: int, k: int, x: list, y: list): | |
| self._intA, self._intB = len(x), 0.03 | |
| self._lstA = [0.0]*abs(self._intA) | |
| for self._intC in range(k): | |
| self._intD = 0.01 | |
| for self._intE in range(self._intA): | |
| self._intF = self.new_decision(x[self._intE], x, y)-y[self._intE] | |
| if (y[self._intE]*self._intF < -t and self._lstA[self._intE] < c) or (y[self._intE]*self._intF > t and self._lstA[self._intE] > 0): | |
| self.update_next_alpha_decisions_state(c, x, y) | |
| if self._intK == self._intL: | |
| continue | |
| self._intM = 1.9*self.next_crystal(x[self._intE], x[self._intG])-self.next_crystal(x[self._intE], x[self._intE])-self.next_crystal(x[self._intG], x[self._intG]) | |
| if self._intM >= 0: | |
| continue | |
| self._lstA[self._intG]-=y[self._intG]*(self._intF-self._intH)/(self._intM/math.log(sum(y))) | |
| self._lstA[self._intG] = max(self._intK, min(self._intL, self._lstA[self._intG])) | |
| if abs(self._lstA[self._intG]-self._intJ) < 1e-2: | |
| continue | |
| self.update_next_crystal_distributes_route(c, x, y) | |
| if self._intD == 0: | |
| break | |
| #______________________________________________________________________________________ | |
| def update_next_alpha_decisions_state(self, c: float, x: list, y: list): | |
| self.next_alpha() | |
| self._intG = self._intP | |
| self._intH = self.new_decision(x[self._intG], x, y)-y[self._intG]+1 | |
| self._intI, self._intJ = self._lstA[self._intE], self._lstA[self._intG] | |
| if y[self._intE] != y[self._intG]: | |
| self._intK, self._intL = max(0, self._intJ-self._intI), min(c, c+self._intJ-self._intI) | |
| else: | |
| self._intK, self._intL = max(0, self._intI+self._intJ-c), min(c, self._intI+self._intJ) | |
| #______________________________________________________________________________________ | |
| def update_next_crystal_distributes_route(self, c: float, x: list, y: list): | |
| self._lstA[self._intE]+=y[self._intE]*y[self._intG]*(self._intJ-self._lstA[self._intG]) | |
| self._intN = self._intB-self._intF-y[self._intE]*(self._lstA[self._intE]-self._intI)*self.next_crystal(x[self._intE], x[self._intE])-y[self._intG]*(self._lstA[self._intG]-self._intJ)*self.next_crystal(x[self._intE], x[self._intG]) | |
| self._intO = self._intB-self._intH-y[self._intE]*(self._lstA[self._intE]-self._intI)*self.next_crystal(x[self._intE], x[self._intG])-y[self._intG]*(self._lstA[self._intG]-self._intJ)*self.next_crystal(x[self._intG], x[self._intG]) | |
| if 0 < self._lstA[self._intE] < c: self._intB = self._intN | |
| elif 0 < self._lstA[self._intG] < c-1: self._intB = self._intO | |
| else: self._intB = (self._intN+self._intO)/2 | |
| self._intD+=1 | |
| #______________________________________________________________________________________ | |
| def new_confrence(self, s: list, x: list, y: list) -> tuple: | |
| return tuple([1 if self.new_decision(n, x, y) > 0 else -1 for n in s]) | |
| #______________________________________________________________________________________ | |
| def new_decision(self, n: int, x: list, y: list) -> int: | |
| return sum(self._lstA[i]*y[i]*self.next_crystal(n, x[i]) for i in range(len(self._lstA)))+self._intB-1 | |
| #______________________________________________________________________________________ | |
| def next_alpha(self): | |
| self._intP = self._intE | |
| while self._intP == self._intE: | |
| self._intP = random.randint(0, abs(self._intA-1)-1) | |
| #______________________________________________________________________________________ | |
| def next_crystal(self, xa: int, xb: int) -> int: | |
| self._lstB = [] | |
| for self._intQ in range(len(xa)): | |
| self._intR = math.sqrt(math.sqrt(abs(xa[self._intQ]-self._intQ))/math.sqrt(abs(xb[self._intQ]+self._intQ)))*(math.sin(self._intQ+1)/math.cos(self._intQ+1)) | |
| self._lstB.append(-(self._intR-1)-math.tan(self._intQ+1)/(math.pi*(self._intQ+1)-math.cos(self._intR+1)/4)) | |
| return sum(self._lstB) | |
| #______________________________________________________________________________________ | |
| def update_decision_matrice(self, grp_id: str): | |
| self._intA, self._lstA, self._lstD = -1, [], [] | |
| while 1: | |
| self._intA+=1 | |
| self._strA = f'rd_{grp_id}_{self._intA}_r' | |
| if staqtapp.findvar(self._strA): self._lstA.append(staqtapp.loadvar(False, self._strA, 's')) | |
| else: | |
| break | |
| for self._lstB in self._lstA: | |
| self._lstC = [int(self._lstB[i].replace('[', '').replace('(', '')) for i in range(4)] | |
| if int(self._lstB[4].replace(']', '')) < 70: | |
| pass # decision is off | |
| self._lstD.append(self._lstC) | |
| self.slt(f'amos_dm_{grp_id}', 1, self._lstD) | |
| #______________________________________________________________________________________ | |
| def next_kerrs(self, grp_id: str, r: float) -> list: | |
| self._lstA = self.slt(f'amos_dm_{grp_id}') | |
| self._intE = len(self._lstA*4) | |
| self._intA = sum([(-math.cos((-math.tan(n+1)-abs(n-1))))/self._intE for dl in self._lstA for n in dl]) | |
| self._intB = 0.7853981633974483 | |
| self._intC = r**2+self._intA**2*math.cos(self._intB)**2 | |
| self._intD = -self._intA*math.sin(self._intB)**2/self._intC | |
| self.slt(f'amos_kr_{grp_id}', 1, [[-(1-2*r/self._intC), self._intD], [self._intD, (r**2+self._intA**2+2*self._intA**2*r*math.sin(self._intB)**2/self._intC)*math.sin(self._intB)**2]]) | |
| #______________________________________________________________________________________ | |
| # --------------------------------------------------------- | |
| # -------------------- LUYH EQUATION ------------------------ | |
| # --------------------------------------------------------- | |
| # 4=/3 3+>2 2-+1 11 1+-2 2<-3 3/=4 | |
| # \|| \|| \|| || ||/ ||/ ||/ | |
| # \|. \|: \. :||: ./ :|/ .|/ | |
| # \|| \|| \| || |/ ||/ ||/ | |
| # \: \. \:.||.:/ ./ :/ | |
| # \|| \|| \||||/ ||/ ||/ | |
| # \. \: .||. :/ ./ | |
| # \|| \|| || ||/ ||/ | |
| # \: \. :||: ./ :/ | |
| # \|| \| || |/ ||/ | |
| # \: \|.||.|/ :/ | |
| # \|| \||||/ ||/ | |
| # \. :||: ./ | |
| # \|| || ||/ | |
| # \: .||. :/ | |
| # \|| || ||/ | |
| # \: || :/ | |
| # \||||/ | |
| #______________________________________________________________________________________ | |
| def luyh_project(self, iks: str, n=5) -> str: | |
| # This function is very computational expensive @iks with larger string sets-- | |
| # n if being 6 or more requires bracketed triple recursions, quantum computing | |
| # *setting n to greater than five will result in errors, functions can't do it | |
| strt, self._lstH = True, [] | |
| while 1: | |
| if strt: strt = False | |
| else: | |
| if len(iks) > 1: | |
| iks = iks[1:len(iks)-1] | |
| else: | |
| break | |
| self._strA = self.luyh_translate_key_to_operators(int(iks)) | |
| self._lstE = self.luyh_dual_recursion_half_loops_distribute(True, n, self._strA) | |
| self._lstE.pop(0) | |
| self._lstF = self.luyh_dual_recursion_half_loops_distribute(False, n, self._strA) | |
| self._lstF.pop(len(self._lstF)-1) | |
| self._lstG = self.luyh_equation_resolve(True, n, 1, self._lstE, self._lstF) | |
| self._lstG = self.luyh_equation_resolve(False, n, 2, self._lstG, None) | |
| self._lstG = self.luyh_equation_resolve(False, n, 4, self._lstG, None) | |
| self._lstH.append(math.trunc(sum(self._lstG))) | |
| self._intA = sum(self._lstH) | |
| self._intB = math.floor((self._intA*max(self._lstH)*min(self._lstH)*(n+min(self._lstH)))*((n*max(self._lstH))*n)) | |
| if self._intB%self._intA == 0: | |
| return f'{self._intA}{str(self._intA)[::-1]}' | |
| else: | |
| return '!' | |
| #______________________________________________________________________________________ | |
| def luyh_translate_key_to_operators(self, integer_key: int) -> str: | |
| self._strA = str(integer_key) | |
| self._strA = self._strA.replace('1', 'L').replace('2','U') | |
| return self._strA.replace('3', 'Y').replace('4','H') | |
| #______________________________________________________________________________________ | |
| def luyh_rotate_pair(self, isRtn: bool, pair: tuple, key_char: str) -> tuple: | |
| if key_char == 'L': | |
| return (pair[1], pair[0]) | |
| elif key_char == 'U': | |
| if isRtn: | |
| return (pair[0]+1, pair[1]+1) | |
| else: | |
| return (pair[0]-1, pair[1]-1) | |
| elif key_char == 'Y': | |
| return pair | |
| elif key_char == 'H': | |
| if isRtn: | |
| return (pair[0]-1, pair[1]-1) | |
| else: | |
| return (pair[0]+1, pair[1]+1) | |
| else: | |
| return pair | |
| #______________________________________________________________________________________ | |
| def luyh_dual_recursion_half_loops_distribute(self, isRtn: bool, n: int, key: str) -> tuple: | |
| if n == 0: | |
| return [[]] | |
| else: | |
| self._lstA = self.luyh_dual_recursion_half_loops_distribute(isRtn, n-1, key) | |
| self._lstB = [(complex(math.floor(math.sqrt((i**j)/(math.pi**3))), i+1), complex(math.floor(math.sqrt((i+j)/(j*math.pi))), j-1)) for i in range(1, n+1) for j in range(1, n+1)] | |
| self._lstC = [self.luyh_rotate_pair(True, pair, key[i%len(key)]) for i, pair in enumerate(self._lstB)] | |
| if isRtn: | |
| return self._lstA+self._lstC | |
| else: | |
| return self._lstB+self._lstA | |
| #______________________________________________________________________________________ | |
| def luyh_equation_resolve(self, isReassemble: bool, n: int, halfLoopMode: int, lstA: list, lstB: list) -> list: | |
| if isReassemble: | |
| self._lstA = [(cmath.sqrt(i[0]*cmath.pi**i[1])-j[1])/cmath.acos(j[0]*i[1]*math.pi) for i in lstA for j in lstB] | |
| self._lstA = set(self._lstA) | |
| return list(self._lstA) | |
| else: | |
| if halfLoopMode == 2: | |
| self._lstA = [(abs(t.real)-abs(t.imag))*(math.cos(t.real+math.pi)**math.sqrt(t.imag+math.pi)) for t in lstA] | |
| return self._lstA | |
| else: | |
| self._lstA = [(((math.sin(t.real+t.imag-math.pi)/math.sqrt(math.pi*4))*math.pi)%(n-t.imag-t.real))/math.pi for t in lstA] | |
| return self._lstA | |
| #______________________________________________________________________________________ | |
| # --------------------------------------------------------- | |
| # --------------------- LUYH COMPONENTS --------------------- | |
| # --------------------------------------------------------- | |
| #______________________________________________________________________________________ | |
| def zebulon_complex_unit(self, zcu_reg_id: str, palindrome_constant: complex, factors: list, t_factor: float, source: float, limit: float): | |
| self.zcu_generate_angles_and_complex_sets(factors, t_factor, limit) | |
| self.zcu_palindromic_shift_pairs(palindrome_constant) | |
| self.zcu_incomplete_log_division_cycle(angles, source) | |
| self.zcu_remap_shift_transfers(angles) | |
| self.zcu_svd_config() | |
| self.zcu_harmonic_pathway() | |
| self._intA = sum(self._lstB) | |
| self.slt(f'zcu_{zcu_reg_id}', 1, [self._lstC, self._lstE, self._lstF, self._intA, self._intB]) | |
| #______________________________________________________________________________________ | |
| def zcu_generate_angles_and_complex_sets(self, factors: list, t_factor: float, limit: float): | |
| # **factors list 2 digit floats only & exact length of 10 also necessary | |
| self._lstA = [t_factor*math.sqrt(i)*(math.pi/limit)*factors[i] for i in range(10)] | |
| self._lstB = [cmath.rect(math.cos(a), a) for a in self._lstA] | |
| #______________________________________________________________________________________ | |
| def zcu_remap_shift_transfers(self, angles: list): | |
| # merged/pi-projected limited length angle ratios from sine values | |
| self._lstD = [math.sin(a) for a in angles] | |
| self._intA = sum(self._lstD) | |
| self._lstE = [a+r*math.pi/2 for a, r in zip(angles, [s/self._intA for s in self._lstD])] | |
| #______________________________________________________________________________________ | |
| def zcu_svd_config(self): | |
| # covariance matrix from repeated length breaks @ the generated complex sets | |
| self._intF, self._intG = [z.real for z in self._lstB], [z.imag for z in self._lstB] | |
| self._intA, self._intB = sum(self._intF)/len(self._intF), sum(self._intG)/len(self._intG) | |
| self._lstH, self._lstI = [r-self._intA for r in self._intF], [i-self._intB for i in self._intG] | |
| self._intG = [[0, 0], [0, 0]] | |
| for self._intA, self._intB in zip(self._lstH, self._lstI): | |
| self._intG[0][0]+=self._intA*self._intA | |
| self._intG[0][1]+=self._intA*self._intB | |
| self._intG[1][0]+=self._intB*self._intA | |
| self._intG[1][1]+=self._intB*self._intB | |
| self._intA = len(self._lstB) | |
| self._intF = [[v/self._intA for v in r] for r in self._intG] | |
| #______________________________________________________________________________________ | |
| def zcu_palindromic_shift_pairs(self, palindrome_constant: complex): | |
| # important return for having the stabilized complex-relink sum constant | |
| self._intA, self._lstC = len(self._lstB), [] | |
| self._intB, self._intC = sum(z.real for z in self._lstB)/self._intA, sum(z.imag for z in self._lstB)/self._intA | |
| self._lstD = [z-complex(self._intB, self._intC) for z in self._lstB] | |
| for self._intE in range(self._intA//2): | |
| self._intB, self._intC = self._lstD[self._intE]+palindrome_constant, self._lstD[self._intA-1-self._intE]+palindrome_constant | |
| if self._intC != 0: self._intD = (self._intB/self._intC)**2 | |
| else: self._intD = self._intB**2 | |
| self._lstC.append((self._intD, self._intD.conjugate())) | |
| #______________________________________________________________________________________ | |
| def zcu_incomplete_log_division_cycle(self, angles: list, source: float): | |
| # pins the pivot lengths from source with the current generated angles | |
| # is assumed @angles is set of no duplicates...or this is going @ clog | |
| self._lstD, self._intA = [], len(angles) | |
| for self._intB in range(self._intA): | |
| for self._intC in range(self._intA): | |
| if self._intB != self._intC: | |
| if angles[self._intC] == 0.0: self._lstD.append(math.log((angles[self._intB]+source)+(angles[self._intC]+source))) | |
| else: self._lstD.append(math.log((angles[self._intB]+source)*(angles[self._intC]+source))) | |
| #______________________________________________________________________________________ | |
| def zcu_harmonic_pathway(self): | |
| # and the completed distribute for the palindromic shifted pairs @log*/<...> | |
| self._intA, self._lstH = None, [] | |
| for c in self._lstD: | |
| for p in self._lstC: | |
| self._intA = (c*cmath.exp(complex(0, p[0].real)), c*cmath.exp(complex(0, p[1].real))) | |
| self._lstH.append(self._intA) | |
| self._intB = sum([t[0]**t[1] for t in self._lstH]) | |
| #______________________________________________________________________________________ | |
| # --------------------------------------------------------- | |
| # ------------------------- MISC. -------------------------- | |
| # --------------------------------------------------------- | |
| #______________________________________________________________________________________ | |
| def check_sqtpp_folders_file(self): | |
| if not os.path.isdir(f'{AMOS_MDL_DIR}/AMOS'): | |
| os.makedirs(f'{AMOS_MDL_DIR}/AMOS') | |
| if not os.path.isdir(f'{AMOS_MDL_DIR}/AMOS/AMOS-SQTPP'): | |
| os.makedirs(f'{AMOS_MDL_DIR}/AMOS/AMOS-SQTPP') | |
| if not os.path.isdir(f'{AMOS_MDL_DIR}/staqtapp1_2'): | |
| os.makedirs(f'{AMOS_MDL_DIR}/staqtapp1_2') | |
| if not os.path.isfile(f'{AMOS_MDL_DIR}/staqtapp1_2/amos.sqtpp'): | |
| self._lstA = [':☆staqtapp-v1.2','|:AMOS-XML-ALPHA42-A<AMOS-ALPHA42-A>','|::|ST1EMB<SQTPP_MNT_STGS,amos_default_mnt>', | |
| '_|::|SQTPP_MNT_STGS<STGS:','__|::|STGS<STGS:','<STGS:S:','lfd=amos_default_mnt/amos_default_dir/amos_rtrn_a;:|:>', | |
| '_|:|:|SQTPP_MNT_STGS>','_|::|amos_default_mnt<amos_default_dir:','__|::|amos_default_dir<amos_rtrn_a,amos_rtrn_b:', | |
| '<amos_rtrn_a:S:','2759916583461832527492:|:>','<amos_rtrn_b:S:','2737162419365285163523:|:>','_|:|:|amos_default_mnt>', | |
| '_|:AMOS-ALPHA42-A<sub-AMOS-ALPHA42-A>','__|:sub-AMOS-ALPHA42-A<tqpt-AMOS-ALPHA42-A,tpqt-AMOS-ALPHA42-A,null>','<sbf-AMOS-ALPHA42-A-svvs:', | |
| '(amos_lll_config=amos_lll_config_1)//>','___|:tqpt-AMOS-ALPHA42-A<tqpt,null,n>:','null','amos_lll_config<@qp(default):>', | |
| 'amos_lll_config_1<@qp(null):>:','___|:(tqpt-AMOS-ALPHA42-A)','___|:tpqt-AMOS-ALPHA42-A<tpqt,12,[E*]>:','<:amos_lll_config=', | |
| '_lo__xylm__mrah__writeMpwcXmlConfig:>','<:___SQTPP___MRSV___=','amos_lll_config_1:>:','___|:(tpqt-AMOS-ALPHA42-A)', | |
| '__|:(sub-AMOS-ALPHA42-A)','_|:(AMOS-ALPHA42-A)','|:(AMOS-XML-ALPHA42-A)'] | |
| with open(f'{AMOS_MDL_DIR}/staqtapp1_2/amos.sqtpp', 'w') as a_sqtpp: a_sqtpp.write('\n'.join(self._lstA)) | |
| self._lstA = None | |
| with open(f'{AMOS_MDL_DIR}/staqtapp1_2/sqtpp1_2.stg', 'w') as a_stg_sqtpp: | |
| a_stg_sqtpp.write('amos:AMOS-XML-ALPHA42-A:AMOS-ALPHA42-A:sub-AMOS-ALPHA42-A:tqpt-AMOS-ALPHA42-A') | |
| #______________________________________________________________________________________ | |
| def add_registry_schema(self): | |
| self._lstA = ['amos_reg_shm_1 = (',' str_q1: (',' type: ( string,',' validator {', | |
| ' lambda x: [[float(n) for n in r]+[0.0]*(max(len(p) for p in x.split("="))-len(r)) for r in x.split("=")]',' }', | |
| ' ),',' lst_q1: (',' type: ( list,',' item: (',' inherit=str_q1,',' type: ( list,',' validator {', | |
| ' lambda x: [[r[0]]+[r[_]*r[_-1] for _ in range(1, len(r))] for r in x if r]',' }',' ),',' lst_q2: (',' type: ( list,', | |
| ' item: (',' inherit=lst_q1,',' type: ( list, set,',' validator {',' lambda x: [sum(r) for r in x],', | |
| ' lambda x: ([x[0]]+[x[_]/x[_-1] for _ in range(1, len(x))], [x[-1]]+[x[_]/x[_+1] for _ in range(len(x)-2, -1, -1)])',' }'] | |
| self._strA = f'{AMOS_MDL_DIR}/AMOS/AMOS-SQTPP/amos_reg_shm_1.txt' | |
| with open(self._strA, 'w') as r_sqtpp: r_sqtpp.write('\n'.join(self._lstA)) | |
| self._lstA = None | |
| staqtapp.registry(False, None, None, self._strA) | |
| #______________________________________________________________________________________ | |
| def slt(self, var_name: str, var_mode=False, var_value=None): | |
| if var_mode: | |
| self._slot[sum(map(ord, var_name))] = var_value | |
| elif not var_mode: | |
| return self._slot[sum(map(ord, var_name))] | |
| else: | |
| self._slot[sum(map(ord, var_name))] = None | |
| #______________________________________________________________________________________ | |
| def render_and_retain_random_decision_params_lists(self, grp_id: int, ttl: int): | |
| for i in range(ttl): | |
| staqtapp.addvar(f'rd_{grp_id}_{i}_d', f'@qp({self.format_list_str(True, str(self.get_random_decision_param_list(True, 8)))}):') | |
| staqtapp.stalkvar(f'rd_{grp_id}_{i}_d', '@qp(skull):') | |
| staqtapp.addvar(f'rd_{grp_id}_{i}_x', f'@qp({self.format_list_str(True, str(self.get_random_decision_param_list(True, 12)))}):') | |
| staqtapp.addvar(f'rd_{grp_id}_{i}_y', f'@qp({self.format_list_str(True, str(self.get_random_decision_param_list(False, 6)))}):') | |
| #______________________________________________________________________________________ | |
| def convert_qp_to_list(self, qp: list) -> list: | |
| return ast.literal_eval(self.format_list_str(False, qp[0])) | |
| #______________________________________________________________________________________ | |
| def format_list_str(self, isEncode: bool, s: str) -> str: | |
| if isEncode: | |
| return s.replace('[', '{').replace(']', '}').replace(',', '-') | |
| else: | |
| return s.replace('{', '[').replace('}', ']').replace('-', ',') | |
| #______________________________________________________________________________________ | |
| def get_random_decision_param_list(self, isArray: bool, ttl: int) -> list: | |
| if isArray: | |
| self._lstA, self._intB, self._intC = [], 0, 0 | |
| for self._intD in range(ttl): | |
| while 1: | |
| self._intA = random.randint(1, 9) | |
| if self._intA != self._intB: | |
| self._intC+=1 | |
| break | |
| if self._intC > 1: | |
| self._lstA.append([self._intA, self._intB]) | |
| self._intC = 0 | |
| else: self._intB = self._intA | |
| return self._lstA | |
| else: | |
| self._lstA = [0] | |
| for self._intB in range(ttl): | |
| while 1: | |
| self._intA = random.randint(1, 9) | |
| if self._intA not in self._lstA: | |
| self._lstA.append(self._intA) | |
| break | |
| self._lstA.pop(0) | |
| return self._lstA | |
| #______________________________________________________________________________________ | |
| def cnsl(self, txt: str, i: int): | |
| if i != None: | |
| if i == 2: i = 0 | |
| elif i == 4: i = 1 | |
| elif i == 6: i = 2 | |
| else: i = 3 | |
| print(f'{self._indt[i]}{txt}') | |
| else: print(txt) | |
| #______________________________________________________________________________________ | |
| def test(): | |
| X = [[3, 8], [4, 9], [9, 5], [5, 7], [4, 8], [9, 4]] | |
| Y = [6, 3, 8, 2, 9, 4] | |
| data = [[3, 1], [3, 6], [6, 3], [4, 6]] | |
| iks = '13424112242131131421111' | |
| cls = AMOS() | |
| #cls.group_reserved_decisions(True, 'CK42171', 5, None, None) | |
| #cls.update_decision_matrice('CK42171') | |
| #cls.next_kerrs('CK42171', 3.1) | |
| #cls.reserve_decision(False, 'A_1_1', data, 1.0, 1e-3, 10, X, Y) | |
| #print(f'\nLUYH CENTER-COMPRESSED PALINDROME NUMBER RESULT: {cls.luyh_project(iks)}') | |
| test() |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Amos 7.7; sees the Lord as a construction worker many years before is a construction worker, carpenter.