I have posted something similar to this before, but I am again reminded of my schooldays.
We had a boy in our class who would sometimes amaze us all with his knowledge, and we valued such contribution enourmously. He did, however, have a bit of an “up himself” streak, which would result in him winding everybody up to the point where, come break time,he would get well and truly duffed up.
Once over, we would not hear from him for a while. Then he would slowly start up again, until the whole cycle repeated itself.
Does this sound familiar?