Skip to content

Instantly share code, notes, and snippets.

View akbargumbira's full-sized avatar

Akbar Gumbira akbargumbira

View GitHub Profile
@akbargumbira
akbargumbira / OverlayImage.py
Created June 22, 2018 16:40 — forked from robsears/OverlayImage.py
Overlay an image in OpenCV using Python
# Adapted from http://www.aishack.in/2010/07/transparent-image-overlays-in-opencv/
from cv2 import *
src = cv.LoadImage("image.jpg") # Load a source image
overlay = cv.LoadImage("ghost.png") # Load an image to overlay
posx = 170 # Define a point (posx, posy) on the source
posy = 100 # image where the overlay will be placed
S = (0.5, 0.5, 0.5, 0.5) # Define blending coefficients S and D
D = (0.5, 0.5, 0.5, 0.5)
apt-get install -y qgis cmake-curses-gui build-essential \
     git gitg meld \
     qtcreator qt4-designer 
     flex bison libgeos-dev libgdal1-dev \
     pyqt4-dev-tools libgsl0-dev libexpat1-dev libproj-dev \
     libqwt-dev libspatialindex-dev libqscintilla2-dev\
     libqscintilla2-dev python-qscintilla2 python-dev python-sip-dev \
 python-qt4-dev postgresql-client-9.3 \

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: