<commit_before>from image_dl import download_file, download_album
import sys

def test(host=""):
    url, name, dest = "", "", "images"
    if host == "":
        print "Downloading image of <NAME>...\n"
        download_file("http://bit.ly/1DbCvWt", "homer.jpg", dest)
    else:
        host = host.lower()
        if host == "imgbox":
            url = "http://imgbox.com/g/IKVdGGtXFK"
            name = "imgbox_test"
            dest += "\imgbox"
        elif host == "imgur":
            url = "http://imgur.com/a/oa9mI"
            name = "imgur_test"
            dest += "\imgur"
        download_album(host, url, name, dest, delim="_")<commit_msg>using os.path.join() for output dirs<commit_after>from image_dl import download_file, download_album
import sys

def test(host=""):
    url, name, dest = "", "", "images"
    if host == "":
        print "Downloading image of <NAME>...\n"
        download_file("http://bit.ly/1DbCvWt", "homer.jpg", dest)
    else:
        host = host.lower()
        if host == "imgbox":
            url = "http://imgbox.com/g/IKVdGGtXFK"
            name = "imgbox_test"
            dest = os.path.join(dest, "imgbox")
        elif host == "imgur":
            url = "http://imgur.com/a/oa9mI"
            name = "imgur_test"
            dest = os.path.join(dest, "imgur")
        download_album(host, url, name, dest, delim="_")
{'fraction_non_alphanumeric': 0.16216216216216217, 'fraction_numerical': 0.0029218407596785976, 'mean_word_length': 2.0786516853932584, 'pattern_counts': {'":': 6, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '38917', 'n_tokens_mistral': 459, 'n_tokens_neox': 450, 'n_words': 103}