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 lang="en"> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Template</title> | |
<!-- Put your CSS below --> | |
<style> | |
h1 { | |
color: red; |
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
{ | |
"vars": { | |
"@gray-base": "#000", | |
"@gray-darker": "lighten(@gray-base, 13.5%)", | |
"@gray-dark": "lighten(@gray-base, 20%)", | |
"@gray": "lighten(@gray-base, 33.5%)", | |
"@gray-light": "lighten(@gray-base, 46.7%)", | |
"@gray-lighter": "lighten(@gray-base, 93.5%)", | |
"@brand-primary": "#ffc107", | |
"@brand-success": "#8bc34a", |
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
function hex (c) { | |
var s = "0123456789abcdef"; | |
var i = parseInt (c); | |
if (i == 0 || isNaN (c)) | |
return "00"; | |
i = Math.round (Math.min (Math.max (0, i), 255)); | |
return s.charAt ((i - i % 16) / 16) + s.charAt (i % 16); | |
} | |
/* Convert an RGB triplet to a hex string */ |
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
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
#extension GL_OES_standard_derivatives : enable | |
uniform float time; | |
uniform vec2 mouse; | |
uniform vec2 resolution; |
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
start = exps:(expr+) { | |
return exps.join('') | |
} | |
call = first:((func:function) / (identifier:id)) "(" exp:expr? ")" { | |
return first + "(" + exp + ")" | |
} | |
id = chars:([a-zA-Z]+) { | |
return chars.join('') | |
} | |
def = "#" identifier:id { |
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
var iterations = 1000000; | |
console.time('Function #1'); | |
for(var i = 0; i < iterations; i++ ){ | |
functionOne(); | |
}; | |
console.timeEnd('Function #1') | |
console.time('Function #2'); | |
for(var i = 0; i < iterations; i++ ){ | |
functionTwo(); |
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
#f2c01d | |
#ed003a | |
#4f8900 |
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
<div id="card"></div> |
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 cv2 | |
import numpy as np | |
def main(): | |
cap = cv2.VideoCapture(0) | |
while(cap.isOpened()): | |
ret, img = cap.read() | |
skinMask = HSVBin(img) |
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
function get(url, cb) { | |
var xhr = new XMLHttpRequest() | |
xhr.onreadystatechange = function() { | |
if (xhr.readyState == 4 && xhr.status == 200) { | |
cb(xhr.responseText) | |
} | |
} | |
xhr.open("GET", url, true) // true for asynchronous | |
xhr.send(null) | |
} |
OlderNewer