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 datetime | |
| import sys | |
| import librosa | |
| def scores(longer, shorter): | |
| scores = [] | |
| for i in range(len(longer) - len(shorter)): | |
| print('\r{}/{}\033[K'.format(i, len(longer) - len(shorter)), end='') |
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
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System; | |
| class LRUCache<K, V> | |
| where K : IComparable | |
| { | |
| private int Size; | |
| private List<KeyValuePair<K, V>> Values; |
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 <string> | |
| template<class T> class Pod { | |
| protected: | |
| virtual void OnReceive(T msg) {} | |
| void Send(T msg) { | |
| Pod<T>* x = this; |
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 <string.h> | |
| #include <stdio.h> | |
| #include <unistd.h> | |
| #define TEST(name, assert) { \ | |
| printf(name); \ | |
| for(int i=strlen(name); i<40-6; i++){ \ | |
| printf(" "); \ | |
| } \ |
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 | |
| cam = cv2.VideoCapture('in.mp4') | |
| old = cv2.cvtColor(cam.read()[1], cv2.COLOR_BGR2GRAY) | |
| matstack = numpy.identity(3) | |
| matlog = [] |
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 itertools | |
| import glob | |
| import cv2 | |
| import numpy | |
| def make_bg(fname): | |
| vid = cv2.VideoCapture(fname) |
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 glob | |
| import cv2 | |
| import numpy | |
| if __name__ == '__main__': | |
| IMG_SIZE = (3648, 2736) | |
| size = (6, 4) |
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 random | |
| import cv2 | |
| import numpy | |
| cascade = cv2.CascadeClassifier('/usr/local/Cellar/opencv3/HEAD/share/OpenCV/haarcascades/haarcascade_frontalface_alt.xml') | |
| cam = cv2.VideoCapture(0) |
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 time | |
| import cv2 | |
| import numpy | |
| SCREEN_SIZE = (1024, 768) | |
| cam = cv2.VideoCapture(0) |
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 time | |
| import cv2 | |
| import numpy | |
| cam = cv2.VideoCapture(0) | |
| def take_photo(): |