Skip to content

Instantly share code, notes, and snippets.

View ferrine's full-sized avatar

Maxim Kochurov ferrine

View GitHub Profile
@ferrine
ferrine / mobius_linear.py
Created July 4, 2019 13:56
Mobius Linear example
import torch.nn
import geoopt
# package.nn.modules.py
def create_ball(ball=None, c=None):
if ball is None:
assert c is not None, "curvature of the ball should be explicitly specified"
ball = geoopt.PoincareBall(c)
elif not isinstance(ball, geoopt.PoincareBall):
raise ValueError("ball should be an instance of PoncareMall")
return ball
@ferrine
ferrine / screenlock
Created February 15, 2020 11:21
i3lock-bluring-4K
#!/bin/zsh
magick convert -size 3840x2160 <(scrot -o /dev/stdout)'[384x216]' -blur 0x5 -resize 1000% RGB:- | i3lock --raw 3840x2160:rgb --image /dev/stdin