# Path: ricloud/compat.py
# PY3 = sys.version_info[0] >= 3
#     def want_bytes(data):
#     def want_text(data):
#     def to_str(data):
#     def want_bytes(data):
#     def want_text(data):
#     def to_str(data):
# 
# Path: ricloud/conf.py
# DEFAULT_CONF_NAME = "ricloud.ini"
# def get_config(config_name=DEFAULT_CONF_NAME):
# def get_user_root_config_path(config_name=DEFAULT_CONF_NAME):
# def get(setting_section, setting_name):
# def getint(setting_section, setting_name):
# def getboolean(setting_section, setting_name):


import os
import csv
import json
import time
import uuid
import base64
import decimal
import hashlib
import logging
import datetime
import ricloud
from collections import OrderedDict
from ricloud import compat
from ricloud import conf
def escape(string):
    return compat.quote(string, safe="")


def get_md5_hash(data, hex_encode=True):
    md5_hash = hashlib.md5(compat.want_bytes(data))

    return md5_hash.hexdigest() if hex_encode else md5_hash.digest()


def get_path_extension(path):
    _, extension = os.path.splitext(path)
    return extension


def get_directory_from_path(path):
    return os.path.split(path)[0]


def ensure_directory_exists(directory):
    if not os.path.exists(directory):
        os.makedirs(directory)


def ensure_path_exists(path):
    directory = get_directory_from_path(path)
    ensure_directory_exists(directory)


def get_filename(*args):

# Path: ricloud/compat.py
# PY3 = sys.version_info[0] >= 3
#     def want_bytes(data):
#     def want_text(data):
#     def to_str(data):
#     def want_bytes(data):
#     def want_text(data):
#     def to_str(data):
# 
# Path: ricloud/conf.py
# DEFAULT_CONF_NAME = "ricloud.ini"
# def get_config(config_name=DEFAULT_CONF_NAME):
# def get_user_root_config_path(config_name=DEFAULT_CONF_NAME):
# def get(setting_section, setting_name):
# def getint(setting_section, setting_name):
# def getboolean(setting_section, setting_name):


# Path: ricloud/utils.py
import os
import csv
import json
import time
import uuid
import base64
import decimal
import hashlib
import logging
import datetime
import ricloud
from collections import OrderedDict
from ricloud import compat
from ricloud import conf

def escape(string):
    return compat.quote(string, safe="")


def get_md5_hash(data, hex_encode=True):
    md5_hash = hashlib.md5(compat.want_bytes(data))

    return md5_hash.hexdigest() if hex_encode else md5_hash.digest()


def get_path_extension(path):
    _, extension = os.path.splitext(path)
    return extension


def get_directory_from_path(path):
    return os.path.split(path)[0]


def ensure_directory_exists(directory):
    if not os.path.exists(directory):
        os.makedirs(directory)


def ensure_path_exists(path):
    directory = get_directory_from_path(path)
    ensure_directory_exists(directory)


def get_filename(*args):

    output_directory = conf.get("samples", "output_directory")