mirror of
https://github.com/osmarks/random-stuff
synced 2026-10-19 15:42:28 +00:00
declassify some projects
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
def step(x):
|
||||
return ((x * 1039) + (x * 6177) + 1605 + (x * 4253)) % 8041
|
||||
|
||||
points = set()
|
||||
a, b, c = None, None, 417
|
||||
for n in range(100000):
|
||||
a, b, c = b, c, step(c)
|
||||
if a is not None and b is not None:
|
||||
points.add((a, b, c))
|
||||
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
fig = plt.figure()
|
||||
ax = plt.axes(projection="3d")
|
||||
def unzip(l):
|
||||
ls = []
|
||||
for x in l:
|
||||
for i, v in enumerate(x):
|
||||
if len(ls) <= i:
|
||||
ls.append([])
|
||||
ls[i].append(v)
|
||||
return ls
|
||||
ax.scatter(*unzip(points))
|
||||
plt.show()
|
||||
Reference in New Issue
Block a user