I hereby claim:
- I am dos1 on github.
- I am dos1 (https://keybase.io/dos1) on keybase.
- I have a public key whose fingerprint is 22DD 9FAE 006A 1143 5836 617C E8F2 35CF 3BDB C3FF
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env python | |
| import sys, wave, numpy, struct | |
| wav = wave.open(sys.argv[1], "r") | |
| (nchannels, sampwidth, rate, nframes, comptype, compname) = wav.getparams() | |
| frames = wav.readframes(nframes * nchannels) | |
| out = struct.unpack_from("%dh" % nframes * nchannels, frames) | |
| signal = numpy.array(out if nchannels == 1 else list([(out[i]+out[i+1])/2 for i in range(0, len(out), 2)]))[::4] | |
| amplitude = abs(numpy.fft.fft(signal)) | |
| freq = numpy.linspace(0, rate / 4, len(amplitude)) | |
| zipped = filter(lambda x: 85 <= x[0] <= 250, zip(freq, amplitude)) |
| //FightCode can only understand your robot | |
| //if its class is called Robot | |
| var Robot = function(robot) { | |
| }; | |
| robots = {} | |
| angles = {} | |
| wyczajony = {} |