def is_valid_tweet(status):
    if ('bot' in status.user.screen_name):
        return False
    if re.search('https?://', status.text):
        return False
    if re.search('#(\\w+)', status.text):
        return False
    tweet = re.sub('@([A-Za-z0-9_]+)', '<unk>', status.text)
    if (tweet.split().count('<unk>') > 1):
        return False
    if (len(tweet.replace('<unk>', '')) > 20):
        return False
    return True
def is_valid_tweet(status):
    if ('bot' in status.user.screen_name):
        return False
    if re.search('https?://', status.text):
        return False
    if re.search('#(\\w+)', status.text):
        return False
    tweet = re.sub('@([A-Za-z0-9_]+)', '<unk>', status.text)
    if (tweet.split().count('<unk>') > 1):
        return False
    if (len(tweet.replace('<unk>', )) > 20):
        return False
    return True