I hereby claim:
- I am einichi on github.
- I am einichi (https://keybase.io/einichi) on keybase.
- I have a public key ASCQze08h-GeTG20PL41yDU0l8cO-6FHfFPHhtERp3TLMgo
To claim this, I am signing this object:
import os | |
import cv2 | |
from pyzbar.pyzbar import decode | |
# Set your directory of images here, make sure no non-image files exist | |
directory = "./images/" | |
for file in os.listdir(directory): | |
# Load image into CV2 | |
image = cv2.imread(directory+file) |
I hereby claim:
To claim this, I am signing this object:
function getIP(host, recordType) { | |
// Specify record type as per described here: https://en.wikipedia.org/wiki/List_of_DNS_record_types | |
// For example, 'A', 'AAAA', 'NS', etc... | |
// So your Google Sheets formula would be =getIP("www.example.com", "A") | |
var url = "https://dns.google.com/resolve?name=" + host + "&type=" + recordType; | |
var json = UrlFetchApp.fetch(url); | |
var response = JSON.parse(json); | |
var answer = response.Answer; | |
var ip = ""; | |
if (typeof answer != "undefined") { |
var elements = document.getElementsByTagName("*"); // Grab all elements, since the actual note content elements have no ID are seemingly randomly generated class IDs | |
var keepTitle = []; | |
var keepContent = []; | |
var x = 0; | |
for (var i=0; i < elements.length; i++) { // Loop through all elements | |
if (elements[i].hasAttribute("contenteditable") && elements[i].getAttribute("contenteditable") == "false") { // Elements with 'contenteditable' attr set to false in the Keep page are fortunately only note title and contents | |
if (x % 2 == 0) { // Simple means of separating title from contents | |
if (elements[i].innerHTML == "") { // Make it clear if the field was empty | |
keepTitle.push("(empty)"); | |
} |