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
package(default_visibility = ["//visibility:public"]) | |
cc_toolchain_suite( | |
name = "toolchain", | |
toolchains = { | |
"armeabi-v7a|compiler": ":cc-compiler-armeabi", | |
"k8|compiler": ":cc-compiler-local", | |
}, | |
) |
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
#!/bin/bash | |
# First you must install the 4.4.0 kernel: | |
# $ sudo apt-get install linux-image-4.4.0-112-generic | |
# find all the other kernels and remove them: | |
# $ sudo apt-get purge linux-image-4.13.0-1008-gcp | |
# $ sudo update-grub | |
# $ sudo reboot | |
sudo apt-get update && sudo apt-get install -y \ |
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
import cv2 | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from skimage.segmentation import slic | |
from skimage.segmentation import mark_boundaries | |
from skimage.data import astronaut | |
from skimage.util import img_as_float | |
import maxflow | |
from scipy.spatial import Delaunay |
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
# adapted from http://docs.opencv.org/3.0-beta/doc/py_tutorials/py_imgproc/py_pyramids/py_pyramids.html | |
import cv2 | |
import numpy as np | |
def Laplacian_Pyramid_Blending_with_mask(A, B, m, num_levels = 6): | |
# assume mask is float32 [0,1] | |
# generate Gaussian pyramid for A,B and mask | |
GA = A.copy() |
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
<!DOCTYPE html> | |
<html> | |
<meta charset="utf-8"> | |
<head> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.23.1/babel.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/d3/4.6.0/d3.min.js"></script> | |
<script src="http://unpkg.com/d3-radial-axis@1.5/dist/d3-radial-axis.min.js"></script> | |
<script src="https://npmcdn.com/d3fc-rebind@4.0.1/build/d3fc-rebind.js"></script> | |
<script src="https://npmcdn.com/d3fc-data-join@2.0.0/build/d3fc-data-join.js"></script> | |
<script src="https://npmcdn.com/d3fc-label-layout@4.0.0/build/d3fc-label-layout.js"></script> |
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
//Override in your touch-enabled view (this can be differen than the view you use for displaying the cam preview) | |
@Override | |
public boolean onTouch(View view, MotionEvent motionEvent) { | |
final int actionMasked = motionEvent.getActionMasked(); | |
if (actionMasked != MotionEvent.ACTION_DOWN) { | |
return false; | |
} | |
if (mManualFocusEngaged) { | |
Log.d(TAG, "Manual focus already engaged"); | |
return 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
# This is kind-of based off of this: http://stackoverflow.com/questions/5974595/download-all-the-linksrelated-documents-on-a-webpage-using-python | |
import cookielib | |
import urllib2 | |
import mechanize | |
from time import sleep | |
import os | |
import cgi | |
# A routine to download a file from a link, by simulating a click on it |
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
/* | |
* GLWidgetOpenGL4Example.h | |
* | |
* Created on: Apr 23, 2016 | |
* Author: roy_shilkrot | |
* | |
*/ | |
class GLWidgetOpenGL4Example : public QGLWidget { | |
public: |
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 numpy as np | |
import cv2 | |
import os | |
import v4l2capture | |
import select | |
if __name__ == '__main__': | |
#cap = cv2.VideoCapture(0) |
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
package com.yourapp.mixins; | |
import org.apache.tapestry5.BindingConstants; | |
import org.apache.tapestry5.ClientElement; | |
import org.apache.tapestry5.annotations.Import; | |
import org.apache.tapestry5.annotations.InjectContainer; | |
import org.apache.tapestry5.annotations.Parameter; | |
import org.apache.tapestry5.ioc.annotations.Inject; | |
import org.apache.tapestry5.json.JSONObject; | |
import org.apache.tapestry5.services.javascript.JavaScriptSupport; |