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
#include <iostream> | |
#include <functional> | |
#include <queue> | |
// These includes are for later experimentation | |
#include <thread> | |
#include <atomic> | |
std::queue<std::function<void()>> funcs; | |
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
[ | |
{ "keys": ["f12"], "command": "htmlprettify"}, | |
{ "keys": ["f1"], "command": "fold" }, | |
{ "keys": ["f2"], "command": "unfold" }, | |
{ "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} }, | |
{ "keys": ["ctrl+space"], "command": "auto_complete" }, | |
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context": | |
[ | |
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" }, |
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
import cv2 | |
import numpy as np | |
import itertools | |
lk_params = dict( winSize = (10, 10), | |
maxLevel = 5, | |
criteria = (cv2.TERM_CRITERIA_EPS | cv2.TERM_CRITERIA_COUNT, 10, 0.03)) | |
feature_params = dict( maxCorners = 3000, | |
qualityLevel = 0.5, |
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
#!/usr/bin/env python | |
""" Video stabilization with OpenCV (>=2.3) and Hugin | |
Adrien Gaidon | |
INRIA - 2012 | |
TODO: add cropping, clean-up and improve doc-strings | |
""" |
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
Mat img = imread("image.jpg"); | |
Mat grey; | |
cvtColor(img, grey, CV_BGR2GREY); | |
Mat sobelx; | |
Sobel(grey, sobelx, CV_32F, 1, 0); | |
double minVal, maxVal; | |
minMaxLoc(sobelx, &minVal, &maxVal); //find minimum and maximum intensities | |
Mat draw; | |
sobelx.convertTo(draw, CV_8U, 255.0/(maxVal - minVal), -minVal); |
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
WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE); | |
WifiInfo wifiInfo = wifiManager.getConnectionInfo(); | |
int ipAddress = wifiInfo.getIpAddress(); | |
String ipString = String.format(“%d.%d.%d.%d”, (ip & 0xff), (ip >> 8 & 0xff), (ip >> 16 & 0xff), (ip >> 24 & 0xff)); |
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
/** | |
* Convert milliseconds in regular style time | |
* @author Asa Baylus | |
**/ | |
function convertMilliseconds (ms, p) { | |
var pattern = p || "hh:mm:ss", | |
arrayPattern = pattern.split(":"), | |
clock = [ ], |
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
#!/usr/bin/env python | |
import random | |
class Markov: | |
def __init__(self, file, size): | |
self.size = size | |
self.starts = [] | |
self.cache = {} | |
self.file_to_words(file) | |
self.parse_words() |
NewerOlder