This file contains 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 <opencv2/core/core.hpp> | |
#include <opencv2/opencv.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
int main(int argc, char** argv) { | |
cv::VideoCapture cap(1); | |
cv::namedWindow("window", 1); | |
while(true) { | |
cv::Mat frame; |
This file contains 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 <opencv2/core/core.hpp> | |
#include <opencv2/opencv.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#include <vector> | |
int main(int argc, char** argv) { | |
cv::VideoCapture cap(1); | |
if(!cap.isOpened()) { | |
std::cout << "Camera couldn't open !\n"; |
This file contains 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
./configure macosx64 --prefix=/usr/local --enable-x11 --enable-opengl | |
make -j4 | |
sudo make install |
This file contains 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
if [ -f /usr/local/bin/thisroot.sh ]; then | |
. /usr/local/bin/thisroot.sh | |
fi |
This file contains 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 gnuplot | |
set term gif animate optimize | |
set output 'ADC1.gif' | |
do for[i=0:8:1] { | |
file = sprintf("ADC1-%03d.dat", i) | |
time = sprintf("t=%d-%d[sec]", i*200, (i+1)*200) | |
set title time | |
plot file w l | |
} |
This file contains 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
bash-3.2$ ls -1 | |
ADC1-000.dat | |
ADC1-001.dat | |
ADC1-002.dat | |
ADC1-003.dat | |
ADC1-004.dat | |
ADC1-005.dat | |
ADC1-006.dat | |
ADC1-007.dat | |
ADC1-008.dat |
This file contains 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 python2.7 | |
import numpy | |
import scipy | |
import scipy.optimize | |
import subprocess | |
def plotme(gnuplottext, filename=None): | |
if filename: |
This file contains 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/local/bin/python | |
import subprocess | |
print 'Content-type: text/html; charset=utf-8' | |
print "\r\n\r\n" | |
print "Checking status<br />" | |
proc = subprocess.Popen("/usr/bin/g++ -v", shell=True, |
This file contains 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 subprocess | |
@route('/command', method='GET') | |
def out(): | |
stdout = "" | |
stderr = "" | |
command = None | |
command = request.GET.get("command") | |
if command: |
This file contains 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
<body> | |
<h3>cmd</h3> | |
<form method="get" action="/cmd"> | |
<input type="text" name="cmd"> | |
<input type="submit" value="exec"> | |
</form> | |
<h3>stdout</h3> | |
<tt> | |
%for out in stdout: | |
{{out}}<br /> |
OlderNewer