<commit_before>import os
import codecs
import logging

from .utils import parseValues

from django.template import Template, Context, loader


class Page(object):
    def __init__(self, site, path):
        self.site = site
        self.path = path

        self.paths = {
            'full': os.path.join(self.site.path, 'pages', self.path),
            # 'build': os.path.join('.build', self.path),
        }

    def data(self):
        f = codecs.open(self.paths['full'], 'r', 'utf-8')
        data = f.read()
        f.close()
        return data

    def context(self):
        """
        The page context.
        """

        # Site context
        context = self.site._contextCache

        # Relative url context
        prefix = '/'.join(
            ['..' for i in xrange(len(self.path.split('/')) - 1)]
        ) or '.'

        context.update({
            'STATIC_URL': '{0}/static'.format(prefix),
            'ROOT_URL': prefix,<commit_msg>fix path seperator on windows<commit_after>import os
import codecs
import logging

from .utils import parseValues

from django.template import Template, Context, loader


class Page(object):
    def __init__(self, site, path):
        self.site = site
        self.path = path

        self.paths = {
            'full': os.path.join(self.site.path, 'pages', self.path),
            # 'build': os.path.join('.build', self.path),
        }

    def data(self):
        f = codecs.open(self.paths['full'], 'r', 'utf-8')
        data = f.read()
        f.close()
        return data

    def context(self):
        """
        The page context.
        """

        # Site context
        context = self.site._contextCache

        # Relative url context
        prefix = '/'.join(
            ['..' for i in xrange(len(self.path.split(os.sep)) - 1)]
        ) or '.'

        context.update({
            'STATIC_URL': '{0}/static'.format(prefix),
            'ROOT_URL': prefix,
{'fraction_non_alphanumeric': 0.14366925064599484, 'fraction_numerical': 0.0031007751937984496, 'mean_word_length': 1.834553440702782, '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': '711092', 'n_tokens_mistral': 586, 'n_tokens_neox': 565, 'n_words': 143}