<commit_before>from glob import glob
import logging
import os

from pylons import config, request, response, session, tmpl_context as c
from pylons.controllers.util import abort, redirect_to

from spline.lib.base import BaseController, render
#from spline import model

log = logging.getLogger(__name__)

class MainController(BaseController):

    def index(self):
        return render('/index.mako')

    def css(self):
        """Returns all the CSS in every plugin, concatenated."""
        # This solution sucks donkey balls, but it's marginally better than
        # loading every single stylesheet manually, so it stays until I have
        # a better idea
        response.headers['Content-type'] = 'text/css; charset=utf-8'

        # We want to let normal template overriding work here, so construct a
        # list of UNIQUE filenames by using a set
        css_files = set()

        for directory in config['pylons.app_globals'].mako_lookup.directories:
            for css_path in glob(os.path.join(directory, 'css', '*.mako')):
                (whatever, css_file) = os.path.split(css_path)
                css_files.add(css_file)

        full_stylesheet = ''
        for css_file in sorted(css_files):<commit_msg>Hardcoded the css controller to always put reset first.<commit_after>from glob import glob
import logging
import os

from pylons import config, request, response, session, tmpl_context as c
from pylons.controllers.util import abort, redirect_to

from spline.lib.base import BaseController, render
#from spline import model

log = logging.getLogger(__name__)

class MainController(BaseController):

    def index(self):
        return render('/index.mako')

    def css(self):
        """Returns all the CSS in every plugin, concatenated."""
        # This solution sucks donkey balls, but it's marginally better than
        # loading every single stylesheet manually, so it stays until I have
        # a better idea
        response.headers['Content-type'] = 'text/css; charset=utf-8'

        # We want to let normal template overriding work here, so construct a
        # list of UNIQUE filenames by using a set
        css_files = set()

        for directory in config['pylons.app_globals'].mako_lookup.directories:
            for css_path in glob(os.path.join(directory, 'css', '*.mako')):
                (whatever, css_file) = os.path.split(css_path)
                css_files.add(css_file)

        css_files.discard('reset.mako')
        full_stylesheet = render('/css/reset.mako')
        for css_file in sorted(css_files):
{'fraction_non_alphanumeric': 0.0872613946240748, 'fraction_numerical': 0.0007791195948578107, 'mean_word_length': 3.0377358490566038, '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': '4708818', 'n_tokens_mistral': 731, 'n_tokens_neox': 695, 'n_words': 245}