- Wav -> RAW -> MFCC -> SIG
usage : python mkmfc.py
| - (void)captureOutput:(AVCaptureOutput *)capture didOutputSampleBuffer:(CMSampleBufferRef)sample fromConnection:(AVCaptureConnection *)connection | |
| { | |
| CVImageBufferRef buffer = CMSampleBufferGetImageBuffer(sample); | |
| CVPixelBufferLockBaseAddress(buffer, 0); | |
| size_t width = CVPixelBufferGetWidth(buffer); | |
| size_t height = CVPixelBufferGetHeight(buffer); | |
| size_t bytesPerRow = CVPixelBufferGetBytesPerRow(buffer); | |
| CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); | |
| CGContextRef cgContext = CGBitmapContextCreate(CVPixelBufferGetBaseAddress(buffer), width, height, 8, bytesPerRow, colorSpace, kCGBitmapByteOrder32Little | kCGImageAlphaPremultipliedFirst); | |
| CGColorSpaceRelease(colorSpace); |
| # | |
| # Git Prompt | |
| # | |
| __git_files() { _files } | |
| autoload -Uz add-zsh-hook | |
| autoload -Uz vcs_info | |
| zstyle ':vcs_info:*' enable git svn hg bzr | |
| zstyle ':vcs_info:*' formats '(%s)-[%b]' | |
| zstyle ':vcs_info:*' actionformats '(%s)-[%b|%a]' | |
| zstyle ':vcs_info:(svn|bzr):*' branchformat '%b:r%r' |
| # | |
| # Git Prompt | |
| # | |
| __git_files() { _files } | |
| autoload -Uz add-zsh-hook | |
| autoload -Uz vcs_info | |
| zstyle ':vcs_info:*' enable git svn hg bzr | |
| zstyle ':vcs_info:*' formats '(%s)-[%b]' | |
| zstyle ':vcs_info:*' actionformats '(%s)-[%b|%a]' | |
| zstyle ':vcs_info:(svn|bzr):*' branchformat '%b:r%r' |
| Buffer.prototype.toByteArray = -> | |
| Array.prototype.slice.call @, 0 |
| [x, y] = process.argv.slice 2, 4 | |
| unless x and y | |
| console.log 'Usage [cmd] [x] [y]' | |
| console.log 'return greatest common divisor x and y' | |
| process.exit 1 | |
| while 0 isnt r = x%y | |
| x = y; y = r |
| var http = require('http'), fs = require('fs'), url = require('url'); | |
| var server = { | |
| root: '.', | |
| port: 8080, | |
| index: 'index.html' | |
| }; | |
| http.createServer(function (req, res) { | |
| var location = url.parse(req.url); | |
| var path = server.root + '/' + server.index; |
| <h1>About</h1> | |
| <p>This is simple server.</p> |
| apt-get install libpcre3-dev libssl-dev zlib1g-dev | |
| ./configure \ | |
| --prefix=/usr/local \ | |
| --conf-path=/usr/local/etc/nginx.conf \ | |
| --pid-path=/usr/local/var/run/nginx.pid \ | |
| --error-log-path=/usr/local/var/log/error.log \ | |
| --http-log-path=/usr/local/var/log/access.log \ | |
| --with-http_dav_module --with-http_mp4_module \ | |
| --with-http_secure_link_module --with-http_ssl_module \ |