<commit_before># -*- coding: utf-8 -*-
'''
Utility functions for salt.cloud
'''

# Import python libs
import os
import sys
import codecs
import shutil
import socket
import tempfile
import time
import subprocess
import multiprocessing
import logging
import pipes
import types
import re
import warnings

# Get logging started
log = logging.getLogger(__name__)

# Import salt libs
import salt.crypt
import salt.client
import salt.config
import salt.utils
import salt.utils.event
from salt.utils.nb_popen import NonBlockingPopen

# Let's import pwd after salt.utils to check for windows platform
try:
    import pwd
except ImportError:
    if not salt.utils.is_windows():
        raise

# Import salt cloud libs
import salt.cloud
from salt.cloud.exceptions import (
    SaltCloudConfigError,
    SaltCloudException,
    SaltCloudSystemExit,
    SaltCloudExecutionTimeout,
    SaltCloudExecutionFailure<commit_msg>Don't rely on `salt.utils.is_windows()`, it fails at install time under windows.<commit_after># -*- coding: utf-8 -*-
'''
Utility functions for salt.cloud
'''

# Import python libs
import os
import sys
import codecs
import shutil
import socket
import tempfile
import time
import subprocess
import multiprocessing
import logging
import pipes
import types
import re
import warnings

# Let's import pwd and catch the ImportError. We'll raise it if this is not
# Windows
try:
    import pwd
except ImportError:
    if not sys.platform.lower().startswith('win'):
        # We can use salt.utils.is_windows() a little down because that will
        # cause issues under windows at install time.
        raise

# Get logging started
log = logging.getLogger(__name__)

# Import salt libs
import salt.crypt
import salt.client
import salt.config
import salt.utils
import salt.utils.event
from salt.utils.nb_popen import NonBlockingPopen

# Import salt cloud libs
import salt.cloud
from salt.cloud.exceptions import (
    SaltCloudConfigError,
    SaltCloudException,
    SaltCloudSystemExit,
    SaltCloudExecutionTimeout,
    SaltCloudExecutionFailure
{'fraction_non_alphanumeric': 0.0628961482203803, 'fraction_numerical': 0.0009751340809361287, 'mean_word_length': 4.275064267352185, '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': '1958302', 'n_tokens_mistral': 573, 'n_tokens_neox': 565, 'n_words': 217}