<commit_before>const path = require('path');
const fs = require('fs');
const app = module.exports = require('express')();



app.get('/:index', (req, res) => {
  const files = fs.readdirSync(path.resolve(__dirname, '../sample_data/'));
  res.sendFile(path.resolve(__dirname, '../sample_data', files[req.params.index%files.length]));
});<commit_msg>only show image files, ignore hidden files<commit_after>const path = require('path');
const fs = require('fs');
const app = module.exports = require('express')();



app.get('/:index', (req, res) => {
  let files = fs.readdirSync(path.resolve(__dirname, '../sample_data/'));
  files = files.filter((file) => {
    if (file[0] === '.') {
      return false;
    }
    if (file.match(/\.(jpe?g|png|svg|gif|bmp)$/i)) {
      return true;
    }
    return false;
  })
  res.sendFile(path.resolve(__dirname, '../sample_data', files[req.params.index%files.length]));
});
{'fraction_non_alphanumeric': 0.21600877192982457, 'fraction_numerical': 0.0010964912280701754, 'mean_word_length': 4.247126436781609, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '3652515', 'n_tokens_mistral': 302, 'n_tokens_neox': 298, 'n_words': 58}