<commit_before>#!/usr/bin/env AFDKOPython
# encoding: UTF-8
from __future__ import division, absolute_import, print_function, unicode_literals

import os, sys, functools, shutil, errno

def relative_to_interpreter(path):
    return os.path.join(os.path.dirname(sys.executable), path)

def relative_to_package(path):
    return os.path.join(__path__[0], path)

def relative_to_cwd(path):
    return os.path.join(os.getcwdu(), path)

def memoize(obj):
    memoized = {}
    @functools.wraps(obj)
    def memoizer(*args, **kwargs):
        k = str(args) + str(kwargs)
        if k not in memoized:
            memoized[k] = obj(*args, **kwargs)
        return memoized[k]
    return memoizer

def remove(path):
    try:
        if os.path.isdir(path):
            shutil.rmtree(path)
        else:
            os.remove(path)
    except OSError as e:
        if e.errno == errno.ENOENT:
            pass
        else:
            raise


def makedirs(path):
    try:
        os.makedirs(path)
    except OSError as e:
        if e.errno == errno.EEXIST and os.path.isdir(path):
            pass
        else:
            raise

def copy(src, dst):
    if os.path.isdir(src):
        shutil.copytree(src, dst)
    else:
        shutil.copy(src, src)

from hindkit.constants import styles, clients, misc
from hindkit.objects.base import BaseObject
from hindkit.objects.family import Family
from hindkit.objects.font import Master, Style, Product
from hindkit.objects.glyphdata import GlyphData
from hindkit.objects.builder import Builder

from hindkit import scripts
<commit_msg>Fix issues in __init__ tools<commit_after>#!/usr/bin/env AFDKOPython
# encoding: UTF-8
from __future__ import division, absolute_import, print_function, unicode_literals

import os, sys, functools, shutil

def relative_to_interpreter(path):
    return os.path.join(os.path.dirname(sys.executable), path)

def relative_to_package(path):
    return os.path.join(__path__[0], path)

def relative_to_cwd(path):
    return os.path.join(os.getcwdu(), path)

def memoize(obj):
    memoized = {}
    @functools.wraps(obj)
    def memoizer(*args, **kwargs):
        k = str(args) + str(kwargs)
        if k not in memoized:
            memoized[k] = obj(*args, **kwargs)
        return memoized[k]
    return memoizer

def remove(path):
    try:
        os.remove(path)
    except OSError:
        if os.path.isdir(path):
            shutil.rmtree(path)
        elif not os.path.exists(path):
            pass
        else:
            raise

def makedirs(path):
    try:
        os.makedirs(path)
    except OSError:
        if not os.path.isdir(path):
            raise

def copy(src, dst):
    if os.path.isdir(src):
        remove(dst)
        shutil.copytree(src, dst)
    else:
        shutil.copy(src, dst)

from hindkit.constants import styles, clients, misc

from hindkit.objects.base import BaseObject
from hindkit.objects.family import Family
from hindkit.objects.font import Master, Style, Product
from hindkit.objects.glyphdata import GlyphData
from hindkit.objects.builder import Builder

from hindkit import scripts

{'fraction_non_alphanumeric': 0.10239018087855298, 'fraction_numerical': 0.0012919896640826874, 'mean_word_length': 2.814039408866995, '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': '3350288', 'n_tokens_mistral': 1022, 'n_tokens_neox': 1015, 'n_words': 255}