def get_console_size():
    return map(int, os.popen('stty size', 'r').read().split())
returns no of rows, no of cols
dataset/ETHPy150Open staranjeet/github-trending-cli/githubtrending/helpers.py/get_console_size