<commit_before>module.exports.main = function () {
  var graph = getGraphFromQueryString(window.location.search.substring(1));
  var createThree = require('ngraph.three');
  var graphics = createThree(graph);

  // begin animation loop:
  graphics.run();
}

function getGraphFromQueryString(queryString) {
  var query = require('query-string').parse(queryString);
  var n = parseInt(query.n, 10) || 10;
  var m = parseInt(query.m, 10) || 10;
  var k = parseInt(query.k, 10) || 10;

  var graphGenerators = require('ngraph.generators');
  var createGraph = graphGenerators[query.graph] || graphGenerators.grid;
  return createGraph(n, m, k);
}
<commit_msg>Added z argument<commit_after>module.exports.main = function () {
  var query = require('query-string').parse(window.location.search.substring(1));
  var graph = getGraphFromQueryString(query);
  var createThree = require('ngraph.three');
  var graphics = createThree(graph);

  graphics.run(); // begin animation loop:
  graphics.camera.position.z = getNumber(query.z, 400);
}

function getGraphFromQueryString(query) {
  var graphGenerators = require('ngraph.generators');
  var createGraph = graphGenerators[query.graph] || graphGenerators.grid;
  return createGraph(getNumber(query.n), getNumber(query.m), getNumber(query.k));
}

function getNumber(string, defaultValue) {
  return parseInt(string, 10) || defaultValue || 10;
}

{'fraction_non_alphanumeric': 0.14203316510454217, 'fraction_numerical': 0.01514059120403749, 'mean_word_length': 5.36697247706422, 'pattern_counts': {'":': 0, '<': 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': '796820', 'n_tokens_mistral': 444, 'n_tokens_neox': 425, 'n_words': 90}