<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Blog.Models.Factory
{
    public static class ExtensionUtility
    {
        public static IEnumerable<T> TakeLast<T>(this IEnumerable<T> source, int count)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }

            if (count <= 0) yield break;


            var queue = new Queue<T>(count);

            foreach (var item in source)
            {
                if (queue.Count == count)
                {
                    queue.Dequeue();
                }                   
                queue.Enqueue(item);
            }

            foreach (var item in queue)
                yield return item;
        }
    }
}
<commit_msg>Small fixes<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Blog.Models.Factory
{
    public static class ExtensionUtility
    {
        public static IEnumerable<T> TakeLast<T>(this IEnumerable<T> source, int count)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }

            if (count <= 0) yield break;


            var queue = new Queue<T>(count);

            foreach (var item in source)
            {
                if (queue.Count == count)
                {
                    queue.Dequeue();
                }                   
                queue.Enqueue(item);
            }

            foreach (var item in queue)
            {
                yield return item;
            }
        }
    }
}

{'fraction_non_alphanumeric': 0.08731082654249127, 'fraction_numerical': 0.0011641443538998836, 'mean_word_length': 1.2618421052631579, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, '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': '6709408', 'n_tokens_mistral': 445, 'n_tokens_neox': 417, 'n_words': 111}