code: def get_free_memory_linux():
      
      try:
          p = Popen('free -m', shell=True, stdout=PIPE, encoding='utf8')
          stdout_string = p.communicate()[0].split('\n')[2]
      except OSError:
          raise OSError
      stdout_list = stdout_string.split(' ')
      stdout_list = [x for x in stdout_list if x != '']
      return int(stdout_list[3])
docs: Return current free memory on the machine for linux.
  
      Warning : this script is really not robust
      Return in MB unit