Skip to content

Instantly share code, notes, and snippets.

@lastforkbender
Last active February 2, 2024 09:40
Show Gist options
  • Select an option

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

Select an option

Save lastforkbender/41326364ef48627428a8a42abaa5dc36 to your computer and use it in GitHub Desktop.
A lambda based totem dashed digits compares
import random as r
import math as m
lvsn = lambda x,y:len(y) if not x else len(x) if not y else min(lvsn(x[1:],y[1:])+(x[0]!=y[0]),lvsn(x[1:],y)+1,lvsn(x,y[1:])+1)
cmpi = lambda ida1,ida2: 1-lvsn(str(int(ida1.split('-')[2][::-1])),str(ida2))/max(len(str(ida2)),len(str(int(ida1.split('-')[2][::-1]))))
# Parameter @loop_length determines total 100 compare set(s) to be evaluated.
def print_base10_totems(loop_length: int) -> str:
lpCnt = 0
for i in range(loop_length):
lpCnt+=1
print(f'Begin of new cmpi set compares {lpCnt}:\n')
# Append reverse dash digits type Levenshtein distance compare results.
lst = []
qCnt = {'f':0,'ft':0,'t':0}
for x in range(100):
# ###-###-##
pn1 = f'{r.randint(111,999)}-{r.randint(111,999)}-{r.randint(11,99)}'
pn2 = f'{r.randint(111,999)}-{r.randint(111,999)}-{r.randint(11,99)}'
# String variable pn1 is the digits id being split reversed.
lst.append(cmpi(pn1,pn2))
if lst[x] == 0.0:
# Result appended to list is 0.0, false.
print(f'.:This number is false: {lst[x]}')
qCnt['f']+=1
elif lst[x] < 0.19:
# Result appended to list is 0.01999~, false & true.
print(f'.:This number is false & true: {lst[x]}')
qCnt['ft']+=1
else:
# Result appended to list is 0.19999~, true.
print(f'.:This number is true: {lst[x]}')
qCnt['t']+=1
# Total all the results by additions, 100 elements fair.
cnt = 0
for y in range(len(lst)): cnt = cnt+lst[y]
# Is more true 100/10>=10
if cnt >= 10:
print(f'\n...this totem number is true: {cnt}\n')
# Is more false 10<100/10
else:
print(f'\n...this totem number is false: {cnt}\n')
print(f'Total true: {qCnt["t"]}')
print(f'Total false: {qCnt["f"]}')
print(f'Total false & true: {qCnt["ft"]}\n')
print('(A higher Rt% either -or+ the more of a gap)\n')
try:
u = m.ceil(qCnt["t"]*(m.tan(qCnt["f"])*((m.sqrt(qCnt["ft"])%(m.pi+m.sin(qCnt["t"]*qCnt["f"])))+m.ceil(qCnt["t"]/2))))
if u < 0 and u > -6:
print(f'U-Poles Rt% commons: {u} !Super random capable set!')
elif u < 6 and u > 0:
print(f'U-Poles Rt% commons: {u} !Super random capable set!')
else:
print(f'U-Poles Rt% commons: {u}')
except Exception as u_rare_err:
print(f'U-Poles Rt% commons: calculation error')
lstR = [float(str(qCnt["t"])+str(qCnt["f"])),float(str(qCnt["t"])+str(qCnt["ft"])),float(str(qCnt["f"])+str(qCnt["t"])),float(str(qCnt["f"])+str(qCnt["ft"]))]
try:
n = m.sqrt(((lstR[0]+lstR[1]+lstR[2]+lstR[3])-6174))/(qCnt["ft"]+m.tan(qCnt["t"]+qCnt["f"]))
print(f'Favorable Menorah Sc-Angle+/-: {n}°')
except Exception as n_rare_err:
print(f'Favorable Menorah Sc-Angle+/-: calculation error')
try:
x = qCnt["t"]*(m.sqrt(qCnt["ft"])/((qCnt["ft"]+(qCnt["t"]*qCnt["f"]))/4))
if x > n: x = x-n
else: x = n-x
print(f'Total H-Mn(*p) Tz-Constant: {x}\n\n\n\n')
except Exception as x_rare_err:
print(f'Total H-Mn[*p] Tz-Constant: calculation error\n\n\n')
print('__________________________________________________')
print('__________________________________________________')
print_base10_totems(20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment