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 _ from 'https://deno.land/x/lodash@4.17.15-es/lodash.js'; | |
const file = await Deno.readTextFile("/Users/psidium/.zsh_history"); | |
const iterator = file.matchAll(/:\s*(\d*):0;/g); | |
const dates: Date[] = []; | |
for (const [, timestamp] of iterator) { | |
dates.push(new Date(1000*Number(timestamp))); | |
} |
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, math | |
import numpy as np | |
class ColourTracker: | |
def __init__(self): | |
#this creates the window you'll use to show the data | |
cv2.namedWindow("ColourTrackerWindow", cv2.CV_WINDOW_AUTOSIZE) | |
self.capture = cv2.VideoCapture(0) | |
self.capture.set(3,320) | |
self.capture.set(4,280) | |
#this sets a scale to down the data (i.e. set to 2 to process a image half the original size) |
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
// | |
// | |
// Created by Psidium on 4/23/15. | |
// MIT License. | |
// | |
// I've created this initializer to load an UIImage from a NSBundle, a XCTest for example | |
// but I didn't know Apple had implemented this as UIImage(fromBundle: ... ) | |
// | |
import UIKit |