<commit_before>import numpy as np
import matplotlib.pyplot as plt
import os
figdir = '../figures'
def save_fig(fname): plt.savefig(os.path.join(figdir, fname))

from scipy.stats import beta


x = np.linspace(0, 1, 100)
aa = [0.1, 1., 2, 2., 8.]
bb = [0.1, 1., 2, 3., 4.]
props = ['b-', 'r:', 'k-.', 'g--', 'c-']
for a, b, p in zip(aa, bb, props):
    y = beta.pdf(x, a, b)
    plt.plot(y, p, lw=3, label='a=%.1f,b=%.1f' % (a, b))
plt.legend(loc='upper left')
save_fig('betadist.pdf')
plt.show()<commit_msg>Figure 2.15: display x values in x-axis (#347)<commit_after>import numpy as np
import matplotlib.pyplot as plt
import os
figdir = '../figures'
def save_fig(fname): plt.savefig(os.path.join(figdir, fname))

from scipy.stats import beta


x = np.linspace(0, 1, 100)
aa = [0.1, 1., 2, 2., 8.]
bb = [0.1, 1., 2, 3., 4.]
props = ['b-', 'r:', 'k-.', 'g--', 'c-']
for a, b, p in zip(aa, bb, props):
    y = beta.pdf(x, a, b)
    plt.plot(x, y, p, lw=3, label='a=%.1f,b=%.1f' % (a, b))
plt.legend(loc='upper left')
plt.ylabel('pdf')
plt.title('Beta distributions')
save_fig('betadist.pdf')
plt.show()
{'fraction_non_alphanumeric': 0.23770491803278687, 'fraction_numerical': 0.04189435336976321, 'mean_word_length': 3.6176470588235294, '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': '2455711', 'n_tokens_mistral': 535, 'n_tokens_neox': 496, 'n_words': 138}