<commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals

import time
from itertools import islice
from collections import OrderedDict

import six
import pytest

from rtv import exceptions
from rtv.packages import praw
from rtv.content import (
    Content, SubmissionContent, SubredditContent, SubscriptionContent,
    RequestHeaderRateLimiter)

try:
    from unittest import mock
except ImportError:
    import mock

# Test entering a bunch of text into the prompt
# (text, parsed subreddit, parsed order)
SUBREDDIT_PROMPTS = OrderedDict([
    ('plain-0', ('python', '/r/python', None)),
    ('plain-1', ('python/', '/r/python', None)),
    ('plain-2', ('r/python', '/r/python', None)),
    ('plain-3', ('/r/python', '/r/python', None)),
    ('new', ('/r/pics/new', '/r/pics', 'new')),
    ('hot', ('/r/pics/hot/', '/r/pics', 'hot')),
    ('top', ('pics/top', '/r/pics', 'top')),
    ('rising', ('r/pics/rising', '/r/pics', 'rising')),
    ('controversial', ('/r/pics/controversial', '/r/pics', 'controversial')),
    ('gilded', ('/r/pics/gilded', '/r/pics', 'gilded'))
    ('top-day', ('/r/pics/top-day', '/r/pics', 'top-day')),
    ('top-hour', ('/r/pics/top-hour', '/r/pics', 'top-hour')),
    ('top-month', ('/r/pics/top-month', '/r/pics', 'top-month')),
    ('top-week', ('/r/pics/top-week', '/r/pics', 'top-week')),
    ('top-year', ('/r/pics/top-year', '/r/pics', 'top-year')),
    ('top-all', ('/r/pics/top-all', '/r/pics', 'top-all')),
    ('pics_linux', ('/r/pics+linux', '/r/pics+linux', None)),
    ('multi-new', ('/r/pics+linux/new', '/r/pics+linux', 'new')),
    ('front_0', ('front', '/r/front', None)),
    ('front-1', ('/r/front', '/r/front', None)),
    ('front-new', ('/r/front/new', '/r/front', 'new')),
    ('front-top-week', ('/r/front/top-week', '/r/front', 'top-week')),
    ('user-0', ('/user/spez', '/u/spez', None)),
    ('user-1', ('/u/spez', '/u/spez', None)),
    ('user-new', ('/u/spez/new', '/u/spez', 'new')),
    ('user-top-all', ('/u/spez/top-all', '/u/spez', 'top-all')),
    ('multi-0', ('/user/multi-mod/m/art', '/u/multi-mod/m/art', None)),
    ('multi-1', ('/u/multi-mod/m/art', '/u/multi-mod/m/art', None)),
    ('multi-top', ('/u/multi-mod/m/art/top', '/u/multi-mod/m/art', 'top')),
    ('multi-top-all', ('/u/multi-mod/m/art/top-all', '/u/multi-mod/m/art', 'top-all')),
    ('domain', ('/domain/python.org', '/domain/python.org', None)),
    ('domain-new', ('/domain/python.org/new', '/domain/python.org', 'new')),
    ('domain-top-all', ('/domain/python.org/top-all', '/domain/python.org', 'top-all')),
])

# Will raise an error if not logged in
SUBREDDIT_AUTH_PROMPTS = OrderedDict([
    ('me-0', ('/user/me', '/u/me', None)),
    ('me-1', ('/u/me', '/u/me', None)),
    ('me-top', ('/u/me/top', '/u/me', 'top')),
    ('me-top-all', ('/u/me/top-all', '/u/me', 'top-all')),<commit_msg>Added missing comma<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals

import time
from itertools import islice
from collections import OrderedDict

import six
import pytest

from rtv import exceptions
from rtv.packages import praw
from rtv.content import (
    Content, SubmissionContent, SubredditContent, SubscriptionContent,
    RequestHeaderRateLimiter)

try:
    from unittest import mock
except ImportError:
    import mock

# Test entering a bunch of text into the prompt
# (text, parsed subreddit, parsed order)
SUBREDDIT_PROMPTS = OrderedDict([
    ('plain-0', ('python', '/r/python', None)),
    ('plain-1', ('python/', '/r/python', None)),
    ('plain-2', ('r/python', '/r/python', None)),
    ('plain-3', ('/r/python', '/r/python', None)),
    ('new', ('/r/pics/new', '/r/pics', 'new')),
    ('hot', ('/r/pics/hot/', '/r/pics', 'hot')),
    ('top', ('pics/top', '/r/pics', 'top')),
    ('rising', ('r/pics/rising', '/r/pics', 'rising')),
    ('controversial', ('/r/pics/controversial', '/r/pics', 'controversial')),
    ('gilded', ('/r/pics/gilded', '/r/pics', 'gilded')),
    ('top-day', ('/r/pics/top-day', '/r/pics', 'top-day')),
    ('top-hour', ('/r/pics/top-hour', '/r/pics', 'top-hour')),
    ('top-month', ('/r/pics/top-month', '/r/pics', 'top-month')),
    ('top-week', ('/r/pics/top-week', '/r/pics', 'top-week')),
    ('top-year', ('/r/pics/top-year', '/r/pics', 'top-year')),
    ('top-all', ('/r/pics/top-all', '/r/pics', 'top-all')),
    ('pics_linux', ('/r/pics+linux', '/r/pics+linux', None)),
    ('multi-new', ('/r/pics+linux/new', '/r/pics+linux', 'new')),
    ('front_0', ('front', '/r/front', None)),
    ('front-1', ('/r/front', '/r/front', None)),
    ('front-new', ('/r/front/new', '/r/front', 'new')),
    ('front-top-week', ('/r/front/top-week', '/r/front', 'top-week')),
    ('user-0', ('/user/spez', '/u/spez', None)),
    ('user-1', ('/u/spez', '/u/spez', None)),
    ('user-new', ('/u/spez/new', '/u/spez', 'new')),
    ('user-top-all', ('/u/spez/top-all', '/u/spez', 'top-all')),
    ('multi-0', ('/user/multi-mod/m/art', '/u/multi-mod/m/art', None)),
    ('multi-1', ('/u/multi-mod/m/art', '/u/multi-mod/m/art', None)),
    ('multi-top', ('/u/multi-mod/m/art/top', '/u/multi-mod/m/art', 'top')),
    ('multi-top-all', ('/u/multi-mod/m/art/top-all', '/u/multi-mod/m/art', 'top-all')),
    ('domain', ('/domain/python.org', '/domain/python.org', None)),
    ('domain-new', ('/domain/python.org/new', '/domain/python.org', 'new')),
    ('domain-top-all', ('/domain/python.org/top-all', '/domain/python.org', 'top-all')),
])

# Will raise an error if not logged in
SUBREDDIT_AUTH_PROMPTS = OrderedDict([
    ('me-0', ('/user/me', '/u/me', None)),
    ('me-1', ('/u/me', '/u/me', None)),
    ('me-top', ('/u/me/top', '/u/me', 'top')),
    ('me-top-all', ('/u/me/top-all', '/u/me', 'top-all')),
{'fraction_non_alphanumeric': 0.29844214948363385, 'fraction_numerical': 0.004551023980395589, 'mean_word_length': 3.3651642475171886, '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': '1319661', 'n_tokens_mistral': 2347, 'n_tokens_neox': 2343, 'n_words': 441}