Skip to content

Instantly share code, notes, and snippets.

@lastforkbender
Created May 29, 2024 05:57
Show Gist options
  • Select an option

  • Save lastforkbender/e62794a5e7fab8f46374f2a2ef68baae to your computer and use it in GitHub Desktop.

Select an option

Save lastforkbender/e62794a5e7fab8f46374f2a2ef68baae to your computer and use it in GitHub Desktop.
Merged encapsulations of count length rotations.
# spice35.py
# https://github.com/lastforkbender/staqtapp
import math
import random
class Diumiance:
__slots__ = ()
class DmnVco(Diumiance):
__slots__ = ('_spice','_dLst1','_dLst2','_dLst3','_dLst4','_dLst5','_dLst6','_dInt1','_dInt2','_dInt3','_dInt4','_dInt5','_dInt6','_dInt7','_dInt8','_dInt9','_dInt10','_dInt11','_dInt12','_dInt13','_dInt14')
def __init__(self):
self._spice = []
def primes(self):
if self._dInt1 <= 1:
return False
for self._dInt2 in range(2, int(self._dInt1 ** 0.5) + 1):
if self._dInt1 % self._dInt2 == 0:
return False
return True
#|||_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_
#_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|||
def goldbach(self):
self._dLst2 = [self._dInt1 for self._dInt1 in range(2, self._dInt3) if self.primes()]
self._dLst1 = []
self._dInt6 = 2
self._dInt4 = 0
for self._dInt7 in range(len(self._dLst2) - self._dInt6 + 1):
self._dLst3 = self._dLst2[self._dInt7:self._dInt7 + self._dInt6]
if sum(self._dLst3) == self._dInt3:
self._dLst1.append(self._dInt3)
for self._dInt8 in range(1, len(self._dLst3)):
self._dInt4+=1
if self._dInt4 == 9: self._dInt4 = 1
self._dLst1.append(self._dInt3 + 9 * self._dInt8)
self._dInt9 = (self._dInt3 + 9 * self._dInt8 + sum(self._dLst3[:self._dInt8])) / 5
if self._dInt9 > 0:
if self._dInt9 > 1568 and self._dInt9 < 2345:
self._dInt9 = self._dInt9+3456
elif self._dInt9 > 2345 and self._dInt9 < 3456:
self._dInt9 = self._dInt9+2345
else:
self._dInt9 = self._dInt9+1568
self._dInt9 = math.ceil((6174 / self._dInt9) * 9) - self._dInt4
self._dInt5 = self._dInt9
if self._dInt9 > 19 and self._dInt9 < 32:
if self._dInt9 > 19 and self._dInt9 < 23: self._dInt9 = '◓'
elif self._dInt9 > 22 and self._dInt9 < 26: self._dInt9 = '◑'
elif self._dInt9 > 25 and self._dInt9 < 29: self._dInt9 = '◒'
elif self._dInt9 > 28 and self._dInt9 < 32: self._dInt9 = '◐'
else:
self._spice.append(self._dInt9)
if self._dInt5 + self._dInt4 <= 24: print(f'•●|:_:|○▪︎: ({self._dInt9})')
else: print(f'•○|_:_|●▪︎: ({self._dInt9})')
print(self._spice)
return self._dLst1
return []
#|||_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_
#_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|||
def shift(self):
self._dLst4 = [0]
for self._dInt11 in str(self._dInt10):
if self._dInt11 == '.':
pass
else:
# //___/ __//_/_///: _/// _/__/_ / ◓ <i ◓+◑ ![3,2,1]!
#if self._dLst4[len(self._dLst4) -1] < 5: self._dLst4.append(self._dLst4[len(self._dLst4) -1] +1)
#elif self._dLst4[len(self._dLst4) -1] > 5 and self._dLst4[len(self._dLst4) - 1] < 9: self._dLst4.append(self._dLst4[len(self._dLst4) -1] -4)
#else: self._dLst4.append(self._dLst4[len(self._dLst4) -1] +9)
if self._dLst4[len(self._dLst4) -1] < 5: self._dLst4.append(1)
elif self._dLst4[len(self._dLst4) -1] > 5 and self._dLst4[len(self._dLst4) - 1] < 9: self._dLst4.append(4)
else: self._dLst4.append(9)
self._dLst4.pop(0)
while 3 in self._dLst4:
print(self._dLst4)
self._dLst4.remove(3)
self._dLst4.insert(0, 3)
return int(''.join(str(self._dInt11) for self._dInt11 in self._dLst4))
#|||_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_
#_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|||
dmnVcoCls = DmnVco()
for dmnVcoCls._dInt3 in range(4, 101, 2):
dmnVcoCls._dLst5 = dmnVcoCls.goldbach()
for dmnVcoCls._dInt12 in range(len(dmnVcoCls._dLst5)):
dmnVcoCls._dLst5[dmnVcoCls._dInt12] += 9 * (dmnVcoCls._dInt12 + 1)
dmnVcoCls._dInt10 = (dmnVcoCls._dLst5[dmnVcoCls._dInt12] + sum(divmod(dmnVcoCls._dLst5[dmnVcoCls._dInt12], 9)) / 5)
dmnVcoCls._spice.append(dmnVcoCls.shift())
#|||_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_
#_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|||
dmnVcoCls._dLst6 = [dmnVcoCls._dInt13 for dmnVcoCls._dInt13 in dmnVcoCls._spice if dmnVcoCls._dInt13 % 10 == 3]
for dmnVcoCls._dInt14 in dmnVcoCls._dLst5:
for eyeve in range(500):
dmnVcoCls._dInt3 = random.randint(1111,9999)
if dmnVcoCls._dInt14 == dmnVcoCls.goldbach():
print(dmnVcoCls._dInt14-eyeve)
print('\n:◐ ◒ ◑ ◓ ◐:')
for dmnVcoCls._dInt14 in dmnVcoCls._dLst6: print(dmnVcoCls._dInt14)
#|||_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_
#_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|||
#|||_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_
#_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|||
#|||_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment