<commit_before>import os
import os.path
import sys
import signal
import argparse
import time
import threading
import requests
import webbrowser
import traceback
import pkg_resources
import socks
import socket

from twitter.stream import TwitterStream, Timeout, HeartbeatTimeout, Hangup
from twitter.api import *
from twitter.oauth import OAuth, read_token_file
from twitter.oauth_dance import oauth_dance
from twitter.util import printNicely

from urllib import error

from .draw import *
from .colors import *
from .config import *
from .consumer import *
from .interactive import *
from .c_image import *
from .py3patch import *
from .emoji import *

# Global values
g = {}

# Lock for streams
StreamLock = threading.Lock()


def parse_arguments():
    """
    Parse the arguments
    """
    parser = argparse.ArgumentParser(description=__doc__ or "")
    parser.add_argument(
        '-to',
        '--timeout',
        help='Timeout for the stream (seconds).')
    parser.add_argument(
        '-tt',
        '--track-keywords',
        help='Search the stream for specific text.')
    parser.add_argument(
        '-fil',
        '--filter',
        help='Filter specific screen_name.')
    parser.add_argument(
        '-ig',
        '--ignore',
        help='Ignore specific screen_name.')
    parser.add_argument(
        '-iot',
        '--image-on-term',
        action='store_true',
        help='Display all image on terminal.')
    parser.add_argument(
        '-ph',
        '--proxy-host',
        help='Use HTTP/SOCKS proxy for network connections.')
    parser.add_argument(
        '-pp',
        '--proxy-port',
        default=8080,
        help='HTTP/SOCKS proxy port (Default: 8080).')
    parser.add_argument(
        '-pt',
        '--proxy-type',
        default='SOCKS4',
        help='Proxy type (HTTP, SOCKS4, SOCKS5; Default: SOCKS5).')
    return parser.parse_args()


def authen():
    """
    Authenticate with Twitter OAuth
    """
    # When using rainbow stream you must authorize.
    twitter_credential = os.environ.get(
        'HOME',
        os.environ.get(<commit_msg>Default proxy type setting corrected<commit_after>import os
import os.path
import sys
import signal
import argparse
import time
import threading
import requests
import webbrowser
import traceback
import pkg_resources
import socks
import socket

from twitter.stream import TwitterStream, Timeout, HeartbeatTimeout, Hangup
from twitter.api import *
from twitter.oauth import OAuth, read_token_file
from twitter.oauth_dance import oauth_dance
from twitter.util import printNicely

from urllib import error

from .draw import *
from .colors import *
from .config import *
from .consumer import *
from .interactive import *
from .c_image import *
from .py3patch import *
from .emoji import *

# Global values
g = {}

# Lock for streams
StreamLock = threading.Lock()


def parse_arguments():
    """
    Parse the arguments
    """
    parser = argparse.ArgumentParser(description=__doc__ or "")
    parser.add_argument(
        '-to',
        '--timeout',
        help='Timeout for the stream (seconds).')
    parser.add_argument(
        '-tt',
        '--track-keywords',
        help='Search the stream for specific text.')
    parser.add_argument(
        '-fil',
        '--filter',
        help='Filter specific screen_name.')
    parser.add_argument(
        '-ig',
        '--ignore',
        help='Ignore specific screen_name.')
    parser.add_argument(
        '-iot',
        '--image-on-term',
        action='store_true',
        help='Display all image on terminal.')
    parser.add_argument(
        '-ph',
        '--proxy-host',
        help='Use HTTP/SOCKS proxy for network connections.')
    parser.add_argument(
        '-pp',
        '--proxy-port',
        default=8080,
        help='HTTP/SOCKS proxy port (Default: 8080).')
    parser.add_argument(
        '-pt',
        '--proxy-type',
        default='SOCKS5',
        help='Proxy type (HTTP, SOCKS4, SOCKS5; Default: SOCKS5).')
    return parser.parse_args()


def authen():
    """
    Authenticate with Twitter OAuth
    """
    # When using rainbow stream you must authorize.
    twitter_credential = os.environ.get(
        'HOME',
        os.environ.get(
{'fraction_non_alphanumeric': 0.11124204572236625, 'fraction_numerical': 0.006127739806740514, 'mean_word_length': 2.6242527754056364, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6310674', 'n_tokens_mistral': 1275, 'n_tokens_neox': 1227, 'n_words': 361}