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
routes = [] | |
#write a function to find path | |
def find_path(node, cities, path, distance): | |
#add way point | |
path.append(node) | |
#calcualte path length | |
if len(path) > 1: | |
distance += cities[path[-2]][node] | |
#if path contains all cities and is not a dead end | |
#add path from the first city |
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 | |
face_cascade=cv2.CascadeClassifier('haarcascade_frontalface_default.xml') | |
eye_cascade=cv2.CascadeClassifier('haarcascade_eye.xml') | |
cap=cv2.VideoCapture(0) | |
while True: | |
ret,img=cap.read() | |
gray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) |
NewerOlder