<commit_before>import argparse
import numpy as np
import matplotlib.pyplot as plt

argParser = argparse.ArgumentParser()
argParser.add_argument('datafile')
args = argParser.parse_args()

time,signal = [],[]
fin = open(args.datafile, 'r')
for line in fin:
    words = line.split(',')
    time.append(float(words[1]))
    signal.append(float(words[0]))
fin.close()
time,signal = np.array(time),np.array(signal)

samplingRate = time.size / time[-1]

plt.specgram(signal, Fs=samplingRate)
plt.xlabel('Time (s)')
plt.ylabel('Frequency (Hz)')
plt.colorbar().set_label('Amplitude')
plt.show()<commit_msg>Added amplitude unit as 'Frequency power'<commit_after>import argparse
import numpy as np
import matplotlib.pyplot as plt

argParser = argparse.ArgumentParser()
argParser.add_argument('datafile')
args = argParser.parse_args()

time,signal = [],[]
fin = open(args.datafile, 'r')
for line in fin:
    words = line.split(',')
    time.append(float(words[1]))
    signal.append(float(words[0]))
fin.close()
time,signal = np.array(time),np.array(signal)

samplingRate = time.size / time[-1]

plt.specgram(signal, Fs=samplingRate)
plt.xlabel('Time (s)')
plt.ylabel('Frequency (Hz)')
plt.colorbar().set_label('Amplitude (Frequency power)')
plt.show()
{'fraction_non_alphanumeric': 0.16612903225806452, 'fraction_numerical': 0.004838709677419355, 'mean_word_length': 5.97191011235955, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4868077', 'n_tokens_mistral': 450, 'n_tokens_neox': 433, 'n_words': 88}