import random
import glob


def sample_malwares(num_to_sample):
    """
    Sample a certain number of malwares from the given directory.

    Args:
        num_to_sample: the number of malwares that needs to be sampled
        Returns: the list of malware directories.
    """
    malware_dirs = random.sample(glob.glob('/datasets/dsc180a-wi20-public/Malware/amd_data_smali/*/*/*'), num_to_sample)
    return malware_dirs