Gabor systems and almost periodic functions