<commit_before># Step 1

## Initialize package.json file

```$ npm init```

## Install nightmare

```$ npm install --save nightmare```

* will take some time *

## Create index.js file and copy/paste code from https://github.com/segmentio/nightmare#api

```
var Nightmare = require('nightmare');		
var nightmare = Nightmare({ show: true });

nightmare
  .goto('https://duckduckgo.com')
  .type('#search_form_input_homepage', 'github nightmare')
  .click('#search_button_homepage')
  .wait('#zero_click_wrapper .c-info__title a')
  .evaluate(function () {
    return document.querySelector('#zero_click_wrapper .c-info__title a').href;
  })
  .end()
  .then(function (result) {
    console.log(result);
  })
  .catch(function (error) {
    console.error('Search failed:', error);
  });<commit_msg>Updated README to fix formatting<commit_after># Step 1

## Initialize package.json file

```$ npm init```

## Install nightmare

```$ npm install --save nightmare```

*will take some time*

## Create index.js file and copy/paste code from [https://github.com/segmentio/nightmare#api]

```
var Nightmare = require('nightmare');		
var nightmare = Nightmare({ show: true });

nightmare
  .goto('https://duckduckgo.com')
  .type('#search_form_input_homepage', 'github nightmare')
  .click('#search_button_homepage')
  .wait('#zero_click_wrapper .c-info__title a')
  .evaluate(function () {
    return document.querySelector('#zero_click_wrapper .c-info__title a').href;
  })
  .end()
  .then(function (result) {
    console.log(result);
  })
  .catch(function (error) {
    console.error('Search failed:', error);
  });
{'fraction_non_alphanumeric': 0.16635630043451272, 'fraction_numerical': 0.0012414649286157666, 'mean_word_length': 4.427609427609427, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '4391310', 'n_tokens_mistral': 535, 'n_tokens_neox': 513, 'n_words': 118}