<commit_before>﻿namespace King.JTrak
{
    using King.Azure.Data;
    using King.JTrak.Models;
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    /// <summary>
    /// Aszure Table Synchronizer
    /// </summary>
    public class Synchronizer : ISynchronizer
    {
        #region Members
        /// <summary>
        /// From Azure Table Storage
        /// </summary>
        protected readonly ITableStorage from = null;

        /// <summary>
        /// To Azure Blob Storage
        /// </summary>
        protected readonly IContainer to = null;
        #endregion

        #region Constructors
        public Synchronizer(ConfigValues config)
        {
        }
        #endregion

        #region Methods
        /// <summary>
        /// Run Synchronization
        /// </summary>
        /// <returns>Task</returns>
        public async Task Run()
        {
            await new TaskFactory().StartNew(() => { });
        }
        #endregion
    }
}<commit_msg>main algo<commit_after>﻿namespace King.JTrak
{
    using King.Azure.Data;
    using King.JTrak.Models;
    using Microsoft.WindowsAzure.Storage.Table;
    using System;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    /// <summary>
    /// Aszure Table Synchronizer
    /// </summary>
    public class Synchronizer : ISynchronizer
    {
        #region Members
        /// <summary>
        /// From Azure Table Storage
        /// </summary>
        protected readonly ITableStorage from = null;

        /// <summary>
        /// To Azure Blob Storage
        /// </summary>
        protected readonly IContainer to = null;
        #endregion

        #region Constructors
        public Synchronizer(ConfigValues config)
        {
        }
        #endregion

        #region Methods
        /// <summary>
        /// Run Synchronization
        /// </summary>
        /// <returns>Task</returns>
        public async Task Run()
        {
            Trace.TraceInformation("Initializing: {0}.", this.to.Name);
            await this.to.CreateIfNotExists();

            Trace.TraceInformation("Loading data from {0}.", this.from.Name);
            var entities = await this.from.Query(new TableQuery());
            if (null != entities && entities.Any())
            {
                Trace.TraceInformation("Storing data to {0}.", this.to.Name);
                foreach (var e in entities)
                {
                    var name = string.Format("", e[TableStorage.PartitionKey], e[TableStorage.RowKey]);
                    await this.to.Save(name, e);
                }
            }
            else
            {
                Trace.TraceInformation("No entities in {0}.", this.from.Name);
            }
        }
        #endregion
    }
}
{'fraction_non_alphanumeric': 0.11467576791808874, 'fraction_numerical': 0.0013651877133105802, 'mean_word_length': 1.559825327510917, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 24, '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': '2101954', 'n_tokens_mistral': 766, 'n_tokens_neox': 760, 'n_words': 187}