<commit_before><?php

/*********************************************************
* Takes a directory full of NASA images - writes a CSV	 *
* file containing pairs of image-date to image-name	 *
* (image-date calculated from the file names, not meta-	 *
* data.							 *
* First argument is the directory of images.		 *
* Second argument is the output file.			 *
*********************************************************/

$dir = $argv[1];
$output = $argv[2];

$files = scandir($dir);
$results_file = fopen($output, 'w');<commit_msg>Fixed issue where '.' etc. would be included.<commit_after><?php

/*********************************************************
* Takes a directory full of NASA images - writes a CSV	 *
* file containing pairs of image-date to image-name	 *
* (image-date calculated from the file names, not meta-	 *
* data.							 *
* First argument is the directory of images.		 *
* Second argument is the output file.			 *
*********************************************************/

$dir = $argv[1];
$output = $argv[2];

$files = array_diff(scandir($dir), array('.', '..', '.DS_Store'));;
$results_file = fopen($output, 'w');
{'fraction_non_alphanumeric': 0.31842105263157894, 'fraction_numerical': 0.0035087719298245615, 'mean_word_length': 4.485576923076923, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5681983', 'n_tokens_mistral': 334, 'n_tokens_neox': 309, 'n_words': 105}