Last active
February 2, 2019 23:47
-
-
Save jazari-akuna/d8f86c023754152cb5c63cab94c1484c to your computer and use it in GitHub Desktop.
Random periodic function generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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