This file contains hidden or 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 numpy as np | |
from math import pi, log | |
import pylab | |
from scipy import fft, ifft | |
from scipy.optimize import curve_fit | |
i = 10000 | |
x = np.linspace(0, 3.5 * pi, i) | |
y = (0.3*np.sin(x) + np.sin(1.3 * x) + 0.9 * np.sin(4.2 * x) + 0.06 * | |
np.random.randn(i)) |
This file contains hidden or 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
func populateStdin(file []byte) func(io.WriteCloser) { | |
return func(stdin io.WriteCloser) { | |
defer stdin.Close() | |
io.Copy(stdin, bytes.NewReader(file)) | |
fmt.Println("copied ok") | |
} | |
} | |
func audio_m4a2mp3(data []byte) ([]byte, error) { | |
binary, lookErr := exec.LookPath("ffmpeg") |
This gist is the source code for http://gary.beagledreams.com/page/go-websocket-chat.html
Copyright (c) 2013 Gary Burd
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: