Text this: Spiking neural network with 1T-1R RRAM synapses and CMOS LIF neurons for in-situ learning and pattern recognition