Skip to content

Instantly share code, notes, and snippets.

@avanish
avanish / 8puzzle.py
Created Jan 15, 2019 — forked from flatline/8puzzle.py
An eight-puzzle solver in python
View 8puzzle.py
# 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 — forked from kendricktan/gabor_filter.py
Gabor kernel filter example in python
View gabor_filter.py
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 Apr 10, 2018 — 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.