Skip to content

Instantly share code, notes, and snippets.


Vadim Mezentsev mezentsev

View GitHub Profile
View Lazy init
object Lib {
private val instance: LibInternal by lazy {
fun init(buider: Builder) = instance.init(builder)
internal class LibInternal : Lib {
private var inited: Boolean
View Double check init
class MyMagicClass private constructor(builder: Builder) {
class Builder {
companion object {
private var instance: MyMagicClass? = null
mezentsev /
Last active May 28, 2019 — forked from maxogden/
Video stabilization using VidStab and FFMPEG (Mac OS X)

Video stabilization using VidStab and FFMPEG

Examples here use the default settings, see the VidStab readme on GitHub for more advanced instructions.

Here's an example video I made

Install ffmpeg with the vidstab plugin from homebrew

brew install ffmpeg --with-libvidstab
View Astar
import numpy
from heapq import *
def heuristic(a, b):
return (b[0] - a[0]) ** 2 + (b[1] - a[1]) ** 2
def astar(array, start, goal):
neighbors = [(0,1),(0,-1),(1,0),(-1,0),(1,1),(1,-1),(-1,1),(-1,-1)]
You can’t perform that action at this time.