Skip to content

Instantly share code, notes, and snippets.

Avatar

Arseniy Kuznetsov akpw

View GitHub Profile
@akpw
akpw / grid.py
Last active Jul 26, 2017
Finds shortest path in rectangular grid with obstacles
View grid.py
#!/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):
View UICollectionView+DefaultReuse.swift
// 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 {
You can’t perform that action at this time.