Skip to content

Instantly share code, notes, and snippets.

@avanish
avanish / 8puzzle.py
Created January 15, 2019 08:20 — forked from flatline/8puzzle.py
An eight-puzzle solver in python
# Solves a randomized 8-puzzle using A* algorithm with plug-in heuristics
import random
import math
_goal_state = [[1,2,3],
[4,5,6],
[7,8,0]]
def index(item, seq):
@avanish
avanish / gabor_filter.py
Created May 23, 2018 04:08 — forked from kendricktan/gabor_filter.py
Gabor kernel filter example in python
import numpy as np
import cv2
# cv2.getGaborKernel(ksize, sigma, theta, lambda, gamma, psi, ktype)
# ksize - size of gabor filter (n, n)
# sigma - standard deviation of the gaussian function
# theta - orientation of the normal to the parallel stripes
# lambda - wavelength of the sunusoidal factor
# gamma - spatial aspect ratio
# psi - phase offset
@avanish
avanish / Flask-blueprint-with-imported-routes
Created April 10, 2018 15:22 — forked from Jaza/Flask-blueprint-with-imported-routes
Example of how to split a Flask blueprint into multiple files, with routes in each file, and of how to register all those routes.
*