'''
Subsample time series
'''

window = 3 #Window size - 1sample will be skiped
fdIn = open('MemFree.txt', 'r')
fdOut = open('MemFree_subSampled.txt', 'w')

count = 0
for line in fdIn:
    if count == 0: fdOut.write(line)
    count += 1
    if count == window: count = 0
fdIn.close()
fdOut.close() 
