This repository provides a tensorflow library and a tutorial to train a recurrent spiking neural network of LIF neurons with SFA (sometimes also referred to as ALIF neurons, neurons with adaptive threshold). The adaptation is implemented as adaptive threshold. The scripts contained reproduce many results from the paper [1].