Skip to content

Instantly share code, notes, and snippets.

@hammertoe
Created January 3, 2020 23:00
Show Gist options
  • Save hammertoe/295a556080652caf80ba45efb18efcfb to your computer and use it in GitHub Desktop.
Save hammertoe/295a556080652caf80ba45efb18efcfb to your computer and use it in GitHub Desktop.
def fft(inp):
inp = tuple(inp)
total = ""
for i, c in enumerate(inp, 1):
pat = [ [item] * i for item in base_pat ]
pat = [item for sublist in pat for item in sublist]
l1 = len(pat)
l2 = len(inp)
pat = pat * math.ceil((l2+1)/l1)
pat = pat[1:l2+1]
out = np.array(inp, dtype=int) * np.array(pat, dtype=int)
final = np.sum(out)
final = str(final)[-1]
total = total + final
return total
for i in range(100):
line = fft(line)
print(line)
print(line[:8])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment