<commit_before>local mp_utils = require('mp.utils')

function search_iqdb()
    name = os.tmpname()
    handle = io.open(name, 'w')

    mp.osd_message('Downloading results from IQDB...')
    mp_utils.subprocess({args = {
        'curl',
        '-F', 'file=@' .. mp.get_property('path'),
        '-o', name,
        'https://iqdb.org/',
    }})

    mp_utils.subprocess({args = {
        'sed',
        '-i', 's#</head>#<base href="https://iqdb.org">$0#',
        name}
    })

    mp_utils.subprocess({args = {<commit_msg>mod-mpv: fix ending tag in iqdb<commit_after>local mp_utils = require('mp.utils')

function search_iqdb()
    name = os.tmpname()
    handle = io.open(name, 'w')

    mp.osd_message('Downloading results from IQDB...')
    mp_utils.subprocess({args = {
        'curl',
        '-F', 'file=@' .. mp.get_property('path'),
        '-o', name,
        'https://iqdb.org/',
    }})

    mp_utils.subprocess({args = {
        'sed',
        '-i', 's#</head>#<base href="https://iqdb.org"></head>#',
        name}
    })

    mp_utils.subprocess({args = {
{'fraction_non_alphanumeric': 0.20728291316526612, 'fraction_numerical': 0.0009337068160597573, 'mean_word_length': 2.35, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6588392', 'n_tokens_mistral': 396, 'n_tokens_neox': 383, 'n_words': 63}