<commit_before>import os
import platform


MyDocumentsPath = None
SavedGamesPath = None
SteamGamesPath = None
SteamCloudPath = None

if platform.system() == 'Windows':
    import ctypes
    from ctypes.wintypes import MAX_PATH

    dll = ctypes.windll.shell32
    buf = ctypes.create_unicode_buffer(MAX_PATH + 1)
    if dll.SHGetSpecialFolderPathW(None, buf, 0x0005, False):
        MyDocumentsPath = os.path.normcase(buf.value)

    from winreg import HKEY_CURRENT_USER, OpenKey, QueryValueEx

    try:
        key = OpenKey(HKEY_CURRENT_USER, 'Software\\Valve\\Steam')
        SteamPath = QueryValueEx(key, 'SteamPath')[0]
        SteamGamesPath = os.path.normcase(os.path.join(SteamPath, 'steamapps', 'common'))
        userdata_dir = os.path.join(SteamPath, 'userdata')
        SteamCloudPath = os.path.join(userdata_dir, os.listdir(userdata_dir)[0])
    except WindowsError:
        pass

    profile_path = os.environ['USERPROFILE']

    _ = os.path.join(profile_path, 'Saved Games')
    if os.path.isdir(_):
        SavedGamesPath = _

if platform.system() == 'Darwin':

    MyDocumentsPath = os.path.expanduser(os.path.join('~', 'Documents'))
    
    SteamPath = os.path.expanduser(os.path.join('~', 'Library', 'Application Support', 'Steam'))
    if os.path.exists(SteamPath):
        SteamGamesPath = os.path.normcase(os.path.join(SteamPath, 'SteamApps', 'common'))
        userdata_dir = os.path.join(SteamPath, 'userdata')

        for it in os.listdir(userdata_dir):
            if it != '.DS_Store':
                SteamCloudPath = os.path.join(userdata_dir, it)<commit_msg>Added detecting for Ubisoft game laucnher<commit_after>import os
import platform


MyDocumentsPath = None
SavedGamesPath = None
SteamGamesPath = None
SteamCloudPath = None
UbisoftSaves = None

if platform.system() == 'Windows':
    import ctypes
    from ctypes.wintypes import MAX_PATH

    dll = ctypes.windll.shell32
    buf = ctypes.create_unicode_buffer(MAX_PATH + 1)
    if dll.SHGetSpecialFolderPathW(None, buf, 0x0005, False):
        MyDocumentsPath = os.path.normcase(buf.value)

    from winreg import HKEY_CURRENT_USER, OpenKey, QueryValueEx

    try:
        key = OpenKey(HKEY_CURRENT_USER, 'Software\\Valve\\Steam')
        SteamPath = QueryValueEx(key, 'SteamPath')[0]
        SteamGamesPath = os.path.normcase(os.path.join(SteamPath, 'steamapps', 'common'))
        userdata_dir = os.path.join(SteamPath, 'userdata')
        SteamCloudPath = os.path.join(userdata_dir, os.listdir(userdata_dir)[0])
    except WindowsError:
        pass

    profile_path = os.environ['USERPROFILE']

    _ = os.path.join(profile_path, 'Saved Games')
    if os.path.isdir(_):
        SavedGamesPath = _

    ubisoft_saves = os.path.join(os.environ["ProgramFiles"], 'Ubisoft', 'Ubisoft Game Launcher', 'savegames')
    if os.path.exists(ubisoft_saves):
        UbisoftSaves = os.path.join(ubisoft_saves, os.listdir(ubisoft_saves)[0])


if platform.system() == 'Darwin':

    MyDocumentsPath = os.path.expanduser(os.path.join('~', 'Documents'))
    
    SteamPath = os.path.expanduser(os.path.join('~', 'Library', 'Application Support', 'Steam'))
    if os.path.exists(SteamPath):
        SteamGamesPath = os.path.normcase(os.path.join(SteamPath, 'SteamApps', 'common'))
        userdata_dir = os.path.join(SteamPath, 'userdata')

        for it in os.listdir(userdata_dir):
            if it != '.DS_Store':
                SteamCloudPath = os.path.join(userdata_dir, it)
{'fraction_non_alphanumeric': 0.1266261925411969, 'fraction_numerical': 0.006071118820468344, 'mean_word_length': 3.5110821382007824, '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': '3770570', 'n_tokens_mistral': 1229, 'n_tokens_neox': 1188, 'n_words': 214}