<commit_before>---
    layout: null
---


{% assign allposts = site.posts | where_exp: "post", "post.published != false" | sort: 'date'%}


const postDates = [
    {% for post in allposts %}
    Date.parse("{{post.date}}".replace(" +0000", ""))
    {% unless forloop.last %},{% endunless %}
    {% endfor %}
];

const oldest = postDates[0];
const n5post = postDates[postDates.length - 5];
const count = postDates.length;
const threeishMonths = 1000 * 60 * 60 * 24 * 30 * 3;


// Returns the posts per year for the last 3 months
function rollingAverage(atDate) {
    const threeishMonthsAgo = atDate - threeishMonths;
    const postsInThePeriod = postDates.filter(d => d >= threeishMonthsAgo);
    return postsInThePeriod.length * 4;
}

// Blog posts per year
const lifetimeSpeed = (count / ((Date.now() - oldest) / 1000 / 60 / 60 / 24 / 365.25)).toFixed(2);
const recentSpeed =  rollingAverage(Date.now());<commit_msg>bring back the decimal point<commit_after>---
    layout: null
---


{% assign allposts = site.posts | where_exp: "post", "post.published != false" | sort: 'date'%}


const postDates = [
    {% for post in allposts %}
    Date.parse("{{post.date}}".replace(" +0000", ""))
    {% unless forloop.last %},{% endunless %}
    {% endfor %}
];

const oldest = postDates[0];
const n5post = postDates[postDates.length - 5];
const count = postDates.length;
const threeishMonths = 1000 * 60 * 60 * 24 * 30 * 3;
const oneYear = 1000 * 60 * 60 * 24 * 365.25;


// Returns the posts per year for the last 3 months
function recentAverage(atDate, samplePeriod) {
    const cutOff = atDate - samplePeriod;
    const postsInThePeriod = postDates.filter(d => d >= cutOff);
    return (postsInThePeriod.length * (oneYear / samplePeriod)).toFixed(1);
}

// Blog posts per year
const lifetimeSpeed = (count / ((Date.now() - oldest) / 1000 / 60 / 60 / 24 / 365.25)).toFixed(1);
const recentSpeed =  recentAverage(Date.now(), threeishMonths);
{'fraction_non_alphanumeric': 0.15642746515229736, 'fraction_numerical': 0.04697986577181208, 'mean_word_length': 3.52803738317757, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5596343', 'n_tokens_mistral': 733, 'n_tokens_neox': 626, 'n_words': 179}