<commit_before>"use strict";

module.exports = orients;

var I = require("ancient-oak");

var ORIENTS = I({
  "1000": { h: -1 },
  "0100": { v: -1 },
  "0010": { v:  1 },
  "0001": { h:  1 },
  "0111": { v: -1 },
  "1011": { h:  1 },
  "1101": { h: -1 },
  "1110": { v:  1 },
  "0011": { h:  1 },
  "1100": { h: -1 },
  "1010": { v:  1 },
  "0101": { v: -1 },
  "1001": { next: true },
  "0110": { next: true }
});


function orients (pixels) {
  return pixels.map(function (row, y) {
    return row.map(function (_, x) {
      return ORIENTS(code(pixels, x, y));
    });
  });
}

function code (pixels, x, y) {
  return [value(x - 1, y - 1),
          value(x    , y - 1),<commit_msg>ORIENTS is not a constant, orient is a function.<commit_after>"use strict";

module.exports = orients;

var I = require("ancient-oak");

var orient = I({
  "1000": { h: -1 },
  "0100": { v: -1 },
  "0010": { v:  1 },
  "0001": { h:  1 },
  "0111": { v: -1 },
  "1011": { h:  1 },
  "1101": { h: -1 },
  "1110": { v:  1 },
  "0011": { h:  1 },
  "1100": { h: -1 },
  "1010": { v:  1 },
  "0101": { v: -1 },
  "1001": { next: true },
  "0110": { next: true }
});


function orients (pixels) {
  return pixels.map(function (row, y) {
    return row.map(function (_, x) {
      return orient(code(pixels, x, y));
    });
  });
}

function code (pixels, x, y) {
  return [value(x - 1, y - 1),
          value(x    , y - 1),
{'fraction_non_alphanumeric': 0.2451888809693514, 'fraction_numerical': 0.10121168923734854, 'mean_word_length': 2.295774647887324, 'pattern_counts': {'":': 28, '<': 3, '<?xml version=': 0, '>': 3, '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': '1819355', 'n_tokens_mistral': 690, 'n_tokens_neox': 607, 'n_words': 165}