<commit_before>'use strict';

var
  path = require('path'),
  fs = require('fs'),
  stream = require('stream'),
  _ = require('lodash'),
  Q = require('q'),
  FS = require('q-io/fs'),
  storage = require('./storage'),
  converter = require('./converter'),
  debug = require('debug')('pictor:main'),
  DEBUG = debug.enabled;

var
  tempDir = '/tmp/pictor/temp',
  presets = {
    xxs: {converter: 'thumbnail', w: 16},
    xs: {converter: 'thumbnail', w: 24},
    s: {converter: 'thumbnail', w: 32},
    m: {converter: 'thumbnail', w: 48},
    l: {converter: 'thumbnail', w: 64},
    xl: {converter: 'thumbnail', w: 128},
    xxl: {converter: 'thumbnail', w: 256}
  },
  converters = {},
  dataStorage,
  cacheStorage;

function _getTempPath(prefix, suffix) {
  return path.join(tempDir, [
    prefix || '',
    Date.now().toString(36),
    '-',
    (Math.random() * 0x100000000 + 1).toString(36),
    '-',
    process.pid,
    suffix || ''
  ].join(''));
}

/**
 * generate variant id based on source id.
 *
 * @param {string} id source id
 * @param {string} [variation]
 * @param {string} [ext]
 * @returns {string}
 * @private
 */
function _getVariantId(id, variation, ext) {
  var variantId = id + '.d';<commit_msg>add sample presets using retina prefix '@2x'<commit_after>'use strict';

var
  path = require('path'),
  fs = require('fs'),
  stream = require('stream'),
  _ = require('lodash'),
  Q = require('q'),
  FS = require('q-io/fs'),
  storage = require('./storage'),
  converter = require('./converter'),
  debug = require('debug')('pictor:main'),
  DEBUG = debug.enabled;

var
  tempDir = '/tmp/pictor/temp',
  presets = {
    xxs: {converter: 'thumbnail', w: 16},
    xs: {converter: 'thumbnail', w: 24},
    s: {converter: 'thumbnail', w: 32},
    m: {converter: 'thumbnail', w: 48},
    l: {converter: 'thumbnail', w: 64},
    xl: {converter: 'thumbnail', w: 128},
    xxl: {converter: 'thumbnail', w: 256},
    'xxs@2x': {converter: 'thumbnail', w: 32},
    'xs@2x': {converter: 'thumbnail', w: 48},
    's@2x': {converter: 'thumbnail', w: 64},
    'm@2x': {converter: 'thumbnail', w: 96},
    'l@2x': {converter: 'thumbnail', w: 128},
    'xl@2x': {converter: 'thumbnail', w: 256},
    'xxl@2x': {converter: 'thumbnail', w: 512}
  },
  converters = {},
  dataStorage,
  cacheStorage;

function _getTempPath(prefix, suffix) {
  return path.join(tempDir, [
    prefix || '',
    Date.now().toString(36),
    '-',
    (Math.random() * 0x100000000 + 1).toString(36),
    '-',
    process.pid,
    suffix || ''
  ].join(''));
}

/**
 * generate variant id based on source id.
 *
 * @param {string} id source id
 * @param {string} [variation]
 * @param {string} [ext]
 * @returns {string}
 * @private
 */
function _getVariantId(id, variation, ext) {
  var variantId = id + '.d';
{'fraction_non_alphanumeric': 0.2090354965937612, 'fraction_numerical': 0.03119397633560416, 'mean_word_length': 3.5145631067961167, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '1402894', 'n_tokens_mistral': 1099, 'n_tokens_neox': 1014, 'n_words': 252}