Skip to content

Instantly share code, notes, and snippets.

View manuthu's full-sized avatar

Mike manuthu

View GitHub Profile
@manuthu
manuthu / delete-etl-dss-data.py
Last active July 4, 2017 05:48
Deletes data from jobs already executed by etl. Pre [Macros](https://doc.dataiku.com/dss/latest/operations/macros.html) this worked
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
# 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
@manuthu
manuthu / mac_os_pic.py
Last active October 18, 2016 15:56
Take a picture on a mac using cv2
# 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)