<commit_before>var http = require('http');
var sys = require('sys');
var fs = require('fs');
var url = require('url');
var crypto = require('crypto');
var exec = require('child_process').exec;
var mkdirp = require('mkdirp');
var port = 11111;

var server = http.createServer(function(req, res){
  var grabe = function(url, filename, dest, type){
    if(type == 'image'){
      var ext = '.png';
    }
    else{
      var ext = '.html';
    }
    exec("phantomjs --ignore-ssl-errors=true grab.js '"+url+"' "+filename+ext, function (error, stdout, stderr) {
      if (error !== null) {
        console.log('exec error: ' + error);
      }
      else{
        if(type == 'image'){
          cropImage(filename+ext, dest);
        }
        else{
          writeHtml(filename+ext, dest);
        }
      }
    });
  }

  var writeHtml = function(filename, dest){
    fs.exists(filename, function(exists){<commit_msg>Add new parameter for iframe better support.<commit_after>var http = require('http');
var sys = require('sys');
var fs = require('fs');
var url = require('url');
var crypto = require('crypto');
var exec = require('child_process').exec;
var mkdirp = require('mkdirp');
var port = 11111;

var server = http.createServer(function(req, res){
  var grabe = function(url, filename, dest, type){
    if(type == 'image'){
      var ext = '.png';
    }
    else{
      var ext = '.html';
    }
    exec("phantomjs --web-security=no --ignore-ssl-errors=true grab.js '"+url+"' "+filename+ext, function (error, stdout, stderr) {
      if (error !== null) {
        console.log('exec error: ' + error);
      }
      else{
        if(type == 'image'){
          cropImage(filename+ext, dest);
        }
        else{
          writeHtml(filename+ext, dest);
        }
      }
    });
  }

  var writeHtml = function(filename, dest){
    fs.exists(filename, function(exists){
{'fraction_non_alphanumeric': 0.17031500266951416, 'fraction_numerical': 0.005339028296849973, 'mean_word_length': 2.778225806451613, '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': '2685567', 'n_tokens_mistral': 603, 'n_tokens_neox': 589, 'n_words': 150}