<commit_before>#!/bin/bash 

which docker || exit 1

netstat -ntlp  2>/dev/null | grep -qv 8888 || exit 1

mkdir -p ~/tmp/dockernodetest 

cd ~/tmp/dockernodetest || exit 1

pwd

echo "
  var http = require('http');
  http.createServer(function (req, res) {
    res.writeHead(200, {'Content-Type': 'text/plain'});
    res.end('Hello, Dockerized Node World!');<commit_msg>if docker not installed, show message and exit rather than just exit<commit_after>#!/bin/bash 

if ! which docker 
then 
  echo "docker not installed, so aborting"
  exit 1
fi

netstat -ntlp  2>/dev/null | grep -qv 8888 || exit 1

mkdir -p ~/tmp/dockernodetest 

cd ~/tmp/dockernodetest || exit 1

pwd

echo "
  var http = require('http');
  http.createServer(function (req, res) {
    res.writeHead(200, {'Content-Type': 'text/plain'});
    res.end('Hello, Dockerized Node World!');
{'fraction_non_alphanumeric': 0.14637002341920374, 'fraction_numerical': 0.02576112412177986, 'mean_word_length': 3.6721311475409837, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1819033', 'n_tokens_mistral': 346, 'n_tokens_neox': 306, 'n_words': 89}