<commit_before>#!/usr/bin/env ruby

# This file reads a directory and transforms the files (generated by
# the SensorLogger android app) to Octave-readable files and png plots.
#
# The first argument of the file requires the directory with the raw csv files
# from the SensorLogger app to transform and plot.
# The second argument indicates whether the files should be plotted (default true)
#
# Example: $ ./transform_logs_to_directory logs/
#
# <NAME> (<EMAIL>)


require 'fileutils'
include FileUtils

suffix_to_filename = %w[accelerometer magnetic_field orientation proximity light gravity lin_acceleration rotation]

directory = ARGV[0]
exit if directory.nil?<commit_msg>Better usage example of ruby script<commit_after>#!/usr/bin/env ruby

# This file reads a directory and transforms the files (generated by
# the SensorLogger android app) to Octave-readable files and png plots.
#
# The first argument of the file requires the directory with the raw csv files
# from the SensorLogger app to transform and plot.
# The second argument indicates whether the files should be plotted (default true)
#
# Example: $ ./transform_logs_to_directory logs/stand-sit-walk-stand-sit
#
# <NAME> (<EMAIL>)


require 'fileutils'
include FileUtils

suffix_to_filename = %w[accelerometer magnetic_field orientation proximity light gravity lin_acceleration rotation]

directory = ARGV[0]
exit if directory.nil?
{'fraction_non_alphanumeric': 0.07010014306151645, 'fraction_numerical': 0.001430615164520744, 'mean_word_length': 5.245535714285714, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5874848', 'n_tokens_mistral': 409, 'n_tokens_neox': 372, 'n_words': 164}