Skip to content

Instantly share code, notes, and snippets.

View akpw's full-sized avatar
💭
I may be slow to respond.

Arseniy Kuznetsov akpw

💭
I may be slow to respond.
View GitHub Profile
// based on https://gist.github.com/gonzalezreal/92507b53d2b1e267d49a
import UIKit
protocol ReusableViewWithDefaultIdentifier {
static var defaultReuseIdentifier: String { get }
}
extension ReusableViewWithDefaultIdentifier where Self: UIView {
static var defaultReuseIdentifier: String {
@akpw
akpw / grid.py
Last active July 26, 2017 12:36
Finds shortest path in rectangular grid with obstacles
#!/usr/bin/env python
# coding=utf8
## explained in details
## in this blog: http://www.akpdev.com/articles/2016/05/26/Leonidas.html
class Point:
''' Represents a point
'''
def __init__(self, x = 0, y = 0):