Skip to content

Instantly share code, notes, and snippets.

Verifying my identity on Peepeth.com 0x6394b37cf80a7358b38068f0ca4760ad49983a1b
@shamatar
shamatar / Rinkeby
Last active December 1, 2017 08:31
Rinkeby testnet
0xe6877a4d8806e9a9f12eb2e8561ea6c1db19978d
@shamatar
shamatar / rwa.py
Last active January 14, 2022 20:17
Keras (keras.is) implementation of Recurrent Weighted Average, as described in https://arxiv.org/abs/1703.01253. Follows original implementation in Tensorflow from https://github.com/jostmey/rwa. Works with fixed batch sizes, requires "batch_shape" parameter in input layer. Outputs proper config, should save and restore properly. You are welcome…
from keras.layers import Recurrent
import keras.backend as K
from keras import activations
from keras import initializers
from keras import regularizers
from keras import constraints
from keras.engine import Layer
from keras.engine import InputSpec
@shamatar
shamatar / FSCopyableImage.h
Created November 12, 2016 05:19
Drop in replacement of UIImageView that supports copy on long-press interaction. In principle - easily editable to arbitrary interaction as it uses block and protocol for functionality
//
// FSCopyableImage.h
//
// Created by Alexander Vlasov on 11.11.16.
// Copyright © 2016 Alexander Vlasov. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol FSCopyableImageViewDelegate;
@interface FSCopyableImageView : UIImageView