Skip to content

Instantly share code, notes, and snippets.

@jazari-akuna
Last active February 2, 2019 23:47
Show Gist options
  • Save jazari-akuna/d8f86c023754152cb5c63cab94c1484c to your computer and use it in GitHub Desktop.
Save jazari-akuna/d8f86c023754152cb5c63cab94c1484c to your computer and use it in GitHub Desktop.
Random periodic function generator
import matplotlib.pyplot as mpl
import time
import random
from espeak import espeak
# система управления ракетами
def randGen(pts=1):
#espeak.set_voice("ru")
#espeak.synth("система управления ракетой вооружена")
#while espeak.is_playing:
# pass
tab=[]
for i in range(pts):
tab.append( random.randint(1,100)*(abs(i)%(1/random.randint(1,pts))) + random.randint(1,pts))
return tab
pts=256
mpl.plot(randGen(pts))
mpl.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment