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
#!/usr/bin/Rscript | |
d <- as.matrix(read.csv2(file("stdin"), header=FALSE, sep=",")) | |
ca <- commandArgs(trailingOnly=TRUE) | |
pdf(file=ca[1], width=12, height=6) | |
plot(d[,1:2], type='n') | |
lines(d) | |
dev.off() |
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
// print out a vector of type T on stdout | |
template <typename T> | |
void printClVector(cl_mem &clVector, int length, cl_command_queue &commands, int printrowlen = -1) | |
{ | |
T *tmp = new T[length]; | |
int err = clEnqueueReadBuffer(commands, clVector, CL_TRUE, 0, sizeof(T) * length, tmp, 0, NULL, NULL ); | |
if (err != CL_SUCCESS) | |
{ | |
printf("Error: Failed to read output array! %d\n", err); | |
exit(1); |
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
#!/usr/bin/env python | |
import os | |
import optparse | |
def processfile(fi, fo) : | |
print 'lame --decode --quiet %s %s' % (fi,fo) | |
if __name__ == '__main__': | |
# parse options | |
parser = optparse.OptionParser() |
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
#include <iostream> | |
#include <sndfile.h> | |
using namespace std; | |
/** | |
* Convert an audio file to mono format (input in first arg, output in second) | |
*/ | |
int main(int argc, char** argv) | |
{ | |
if (argc != 3) |
NewerOlder