EvilZone

Programming and Scripting => Scripting Languages => Topic started by: taters on July 30, 2014, 06:58:32 PM

Title: [Python] Dubstep Generator
Post by: taters on July 30, 2014, 06:58:32 PM
Pretty much speaks for itself.

Code: (python) [Select]
import random
import time
import datetime
count = 1
while count:
seconds = datetime.datetime.now()
wait = random.uniform(0.1,2)
if seconds.second % 5 > 0:
print "wub"
else:
print "GRAWWOOOLLLRRRAAANGANG"
time.sleep(wait)
Title: Re: [Python] Dubstep Generator
Post by: daxda on July 30, 2014, 07:23:36 PM
He's my idol!
Title: Re: [Python] Dubstep Generator
Post by: Deque on July 30, 2014, 09:55:15 PM
I love it. But much too slow. That's how my grandma would create dubstep with her walking frame.
Title: Re: [Python] Dubstep Generator
Post by: taters on July 30, 2014, 11:16:39 PM
Just wait for version 2.0
Title: Re: [Python] Dubstep Generator
Post by: Phage on July 30, 2014, 11:22:22 PM
Why define "count" to be one, and not simply do:

Code: [Select]
while 1:
?

Anyway, lulz at the script.
Title: Re: [Python] Dubstep Generator
Post by: taters on July 31, 2014, 09:20:11 PM
Why define "count" to be one, and not simply do:

Code: [Select]
while 1:
?

Anyway, lulz at the script.

Because I originally had it set to 100 and had the loop subtract 1 every cycle, but it appeared to be funnier with it being an endless loop. I went with the first thing that popped into my head.
Title: Re: [Python] Dubstep Generator
Post by: kenjoe41 on August 01, 2014, 10:22:40 AM
Wait, since when does taters code? i swear this is my first code shit i have ever seen from taters. I should get out of this shit hole of Africa; i am way too behind.
Title: Re: [Python] Dubstep Generator
Post by: taters on August 01, 2014, 03:25:08 PM
Wait, since when does taters code? i swear this is my first code shit i have ever seen from taters. I should get out of this shit hole of Africa; i am way too behind.

I was a professional programmer for 3 years before moving into systems administration and then security. I just don't often show off.

Also, I decided to learn a bit of python a few days ago and was bored. So that helps too.