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
| #Min Steps in Infinite GridBookmark Suggest Edit | |
| import math as mat | |
| def maxsteps(x,y): | |
| steps =0 | |
| cov = (x[0],y[0]) | |
| n = len(x) | |
| for i in range(1,n): | |
| diffX = mat.fabs(cov[0]-x[i]) | |
| diffy = mat.fabs(cov[1]-y[i]) |
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
| from tkinter import * | |
| from tkinter import ttk | |
| from PIL import ImageTk,Image | |
| from tkinter.filedialog import askopenfilename | |
| import cv2 | |
| import uuid | |
| import time | |
| import tkinter | |
| import PIL.Image, PIL.ImageTk | |
| from PIL import Image |
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
| def create_cnn( height, width, depth, filters=(16, 32, 64), regress=False): | |
| filters = np.asarray(filters) | |
| input_shape = (height, width, depth) | |
| chanDim = -1 | |
| inputs = Input(shape=input_shape) |
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
| def create_mlp(dim, regress=False): | |
| model = Sequential() | |
| model.add(Dense(8, input_dim=dim, activation="relu")) | |
| model.add(Dense(4, activation="relu")) | |
| if regress: | |
| model.add(Dense(1, activation="linear")) |
OlderNewer