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
ubuntu@etl:/etc/cron.daily$ cat delete-etl-dss-data-job.py | |
#!/usr/bin/env python | |
import datetime | |
import glob | |
import logging | |
import logging.handlers | |
import shutil | |
import subprocess | |
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
# install dependencies | |
sudo apt-get update | |
sudo apt-get install -y build-essential | |
sudo apt-get install -y cmake | |
sudo apt-get install -y libgtk2.0-dev | |
sudo apt-get install -y pkg-config | |
sudo apt-get install -y python-numpy python-dev | |
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev | |
sudo apt-get install -y libjpeg-dev libpng-dev libtiff-dev libjasper-dev | |
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
# The following gist uses python opencv2 (http://opencv.org) to take a pic | |
import cv2 | |
def capture_image(image_file): | |
video = cv2.VideoCapture() | |
video.open(0) | |
_, image = video.retrieve() | |
video.release() | |
cv2.imwrite(image_file, image) |
NewerOlder