<commit_before># -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
## Description
"""
Core program to exchange datas.
"""
#-------------------------------------------------------------------------------

import os, sys
sys.dont_write_bytecode = True
import hou

from . import define as Define
reload(Define)

#-------------------------------------------------------------------------------
# Houdini data management class
#-------------------------------------------------------------------------------
class houManager(object):

    """docstring for houManager"""
    def __init__(self):
        super(houManager, self).__init__()


    def getCacheList(self):
        ## Init variable
        current_cache_nodes = []
        all_nodes = hou.pwd().allSubChildren()

        for node in all_nodes:
            if node.type().name().lower() in Define.CACHE_NODES:

                eachNode_dict     = {}
                node_path         = node.path()
                cachePath         = self.unexpStrPath(node_path)

                eachNode_dict["name"]           = node.name()
                eachNode_dict["node_path"]      = node.path()
                eachNode_dict["cache_path"]     = self.unexpStrPath(node_path)
                eachNode_dict["env"]            = self.analizeEnv(cachePath)
                eachNode_dict["expanded_path"]  = node.evalParm("file")
                eachNode_dict["color"]         = node.color().rgb()

                current_cache_nodes.append(eachNode_dict)

        return current_cache_nodes


    def unexpStrPath(self, path=""):
        cachePath = path + "/file"
        unExpPath = hou.parm(cachePath).unexpandedString()
        return unExpPath


    def analizeEnv(self, path=""):
        pathParts = path[0].split('/')
        if pathParts[0] == None:
            return "-"
        else:
            return pathParts[0]


#-------------------------------------------------------------------------------
# OS file management class
#-------------------------------------------------------------------------------
class fileManager(object):
    """docstring for fileManager"""
    def __init__(self):<commit_msg>Turn houManager's methods into classmethod.<commit_after># -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
## Description
"""
Core program to exchange datas.
"""
#-------------------------------------------------------------------------------

import os, sys
sys.dont_write_bytecode = True
import hou

from . import define as Define
reload(Define)

#-------------------------------------------------------------------------------
# Houdini data management class
#-------------------------------------------------------------------------------
class houManager(object):
    """Core API to access to Houdini Datas
    """
    def __init__(self):
        super(houManager, self).__init__()

    @classmethod
    def getCacheList(self):
        ## Init variable
        current_cache_nodes = []
        all_nodes = hou.pwd().allSubChildren()

        for node in all_nodes:
            if node.type().name().lower() in Define.CACHE_NODES:

                eachNode_dict     = {}
                node_path         = node.path()
                cachePath         = self.unexpStrPath(node_path)

                eachNode_dict["name"]           = node.name()
                eachNode_dict["node_path"]      = node_path
                eachNode_dict["cache_path"]     = self.unexpStrPath(node_path)
                eachNode_dict["env"]            = self.analizeEnv(cachePath)
                eachNode_dict["expanded_path"]  = node.evalParm("file")
                eachNode_dict["color"]         = node.color().rgb()

                current_cache_nodes.append(eachNode_dict)

        return current_cache_nodes


    @classmethod
    def unexpStrPath(self, path=""):
        cachePath = path + "/file"
        unExpPath = hou.parm(cachePath).unexpandedString()
        return unExpPath


    @classmethod
    def analizeEnv(self, path=""):
        pathParts = path[0].split('/')
        if pathParts[0] == None:
            return "-"
        else:
            return pathParts[0]


#-------------------------------------------------------------------------------
# OS file management class
#-------------------------------------------------------------------------------
class fileManager(object):
    """docstring for fileManager"""
    def __init__(self):
{'fraction_non_alphanumeric': 0.301218161683278, 'fraction_numerical': 0.0017718715393133999, 'mean_word_length': 1.1474084640989064, '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': '954162', 'n_tokens_mistral': 1088, 'n_tokens_neox': 1040, 'n_words': 216}