<commit_before>
var http = require('http');
var net = require('net');
var url = require('url');

// We create the server
http.createServer(function (req, res) { // This callback is called every time a request come to the webserver
    if(/favicon/i.test(req.url)){
      res.writeHead(404, {'Content-Type': 'text/html'});
      res.end();
      return;
    }
    var url = req.url.split('?');
    var args = url[1];
    var ar = args.split("&");
    var paramObjet = {};

    for(var i = 0; i < ar.length; i++){
      var argument = ar[i].split('=');
      paramObjet[argument[0]] = argument[1];
    }

    var options = {
 
    host: paramObjet.site

  };

    http.get(options, function(resp) {
      resp.on('data', function(chunk){
        res.end(chunk);
      });
    }).on('error', function(e) {
      console.log("Got error: " + e.message);
    });


}).listen(1337, "127.0.0.1");


console.log('Server running at http://127.0.0.1:1337/');
<commit_msg>Finish lesson 4<commit_after>
var http = require('http');
var net = require('net');
var url = require('url');

// We create the server
http.createServer(function (req, res) { // This callback is called every time a request come to the webserver
    if(/favicon/i.test(req.url)){
      res.writeHead(404, {'Content-Type': 'text/html'});
      res.end();
      return;
    }
    var url = req.url.split('?');
    var args = url[1];
    var ar = args.split("&");
    var paramObjet = {};

    for(var i = 0; i < ar.length; i++){
      var argument = ar[i].split('=');
      paramObjet[argument[0]] = argument[1];
    }

    var options = {
 
      hostname: paramObjet.site

    };

    http.get(options, function(resp) {
      resp.on('data', function(chunk){
        res.end(chunk);
      });
    }).on('error', function(e) {
      console.log("Got error: " + e.message);
    });


}).listen(1337, "127.0.0.1");


console.log('Server running at http://127.0.0.1:1337/');

{'fraction_non_alphanumeric': 0.19585492227979276, 'fraction_numerical': 0.02849740932642487, 'mean_word_length': 2.6641366223908918, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '1345995', 'n_tokens_mistral': 704, 'n_tokens_neox': 659, 'n_words': 156}