<commit_before># -*- coding: utf-8 -*-

"""
clint.resources
~~~~~~~~~~~~~~~

This module contains all the application resource features of clint.

"""


from __future__ import absolute_import

import errno
from os import remove, removedirs
from os.path import isfile, join as path_join

from .packages.appdirs import AppDirs, AppDirsError
from .utils import mkdir_p, is_collection


__all__ = (
    'init', 'user', 'site', 'cache',
    'log', 'NotConfigured'
)


class AppDir(object):
    """Application Directory object."""

    def __init__(self, path=None):
        self.path = path
        self._exists = False

        if path:
            self._create()


    def __repr__(self):
        return '<app-dir: %s>' % (self.path)
    

    def __getattribute__(self, name):

        if not name in ('_exists', 'path', 'create', '_raise_if_none'):
            if not self._exists:
                self._create()
        return object.__getattribute__(self, name)


    def _raise_if_none(self):<commit_msg>create -> _create recursion fix<commit_after># -*- coding: utf-8 -*-

"""
clint.resources
~~~~~~~~~~~~~~~

This module contains all the application resource features of clint.

"""


from __future__ import absolute_import

import errno
from os import remove, removedirs
from os.path import isfile, join as path_join

from .packages.appdirs import AppDirs, AppDirsError
from .utils import mkdir_p, is_collection


__all__ = (
    'init', 'user', 'site', 'cache',
    'log', 'NotConfigured'
)


class AppDir(object):
    """Application Directory object."""

    def __init__(self, path=None):
        self.path = path
        self._exists = False

        if path:
            self._create()


    def __repr__(self):
        return '<app-dir: %s>' % (self.path)
    

    def __getattribute__(self, name):

        if not name in ('_exists', 'path', '_create', '_raise_if_none'):
            if not self._exists:
                self._create()
        return object.__getattribute__(self, name)


    def _raise_if_none(self):
{'fraction_non_alphanumeric': 0.12900049236829148, 'fraction_numerical': 0.0009847365829640572, 'mean_word_length': 2.8631178707224336, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '2050925', 'n_tokens_mistral': 631, 'n_tokens_neox': 599, 'n_words': 182}