<commit_before>using IdentityModel.Client;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;

namespace ConsoleClient
{
  class Program
  {
    static readonly string STS_HOST = "https://localhost:5001";
    static readonly string API_HOST = "https://localhost:5001";
    static readonly int AMOUNT_OF_STEPPERS = 100;

    static void Main(string[] args)
    {
      MainAsync(args).GetAwaiter().GetResult();
    }

    static async Task MainAsync(string[] args)
    {
      HttpClientHandler clientHandler = new HttpClientHandler();
      clientHandler.ServerCertificateCustomValidationCallback
        = (sender, cert, chain, sslPolicyErrors) => { return true; };

      var httpClient = new HttpClient(clientHandler);
      httpClient.DefaultRequestHeaders.Clear();

      // Make the call and get the access token back
      TokenResponse response = await httpClient
        .RequestClientCredentialsTokenAsync(new ClientCredentialsTokenRequest
        {
          Address = $"{STS_HOST}/connect/token",
          ClientId = "console_client",
          ClientSecret = "00000000-0000-0000-0000-000000000001",
          Scope = "webapi_scope"
        });

      // all good?
      if (!response.IsError)
      {
        Console.ForegroundColor = ConsoleColor.Green;
        Console.WriteLine();
        Console.WriteLine("SUCCESS!!");
        Console.WriteLine();
        Console.WriteLine("Access Token: ");
        Console.WriteLine(response.AccessToken);

        httpClient.SetBearerToken(response.AccessToken);

        var steppers = GetSteppers(AMOUNT_OF_STEPPERS);
        foreach (var stepper in steppers)
        {
          var createStepperResponse = await CreateStepper(httpClient, stepper);
          if (createStepperResponse.IsSuccessStatusCode)
          {
            var content = await createStepperResponse.Content.ReadAsStringAsync();

            var stepperId = int.Parse(content);
            var processStepperResponse = await ProcessStepper(httpClient, stepperId);
            if (processStepperResponse.IsSuccessStatusCode)
            {
              Console.WriteLine($"Workflow for stepper id {stepperId} started...");
            }
          }
        }<commit_msg>allowed passing in the amount of steppers to create for ConsoleClient<commit_after>using IdentityModel.Client;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;

namespace ConsoleClient
{
  class Program
  {
    static readonly string STS_HOST = "https://localhost:5001";
    static readonly string API_HOST = "https://localhost:5001";
    static readonly int AMOUNT_OF_STEPPERS = 100;

    static void Main(string[] args)
    {
      MainAsync(args).GetAwaiter().GetResult();
    }

    static async Task MainAsync(string[] args)
    {
      HttpClientHandler clientHandler = new HttpClientHandler();
      clientHandler.ServerCertificateCustomValidationCallback
        = (sender, cert, chain, sslPolicyErrors) => { return true; };

      var httpClient = new HttpClient(clientHandler);
      httpClient.DefaultRequestHeaders.Clear();

      // Make the call and get the access token back
      TokenResponse response = await httpClient
        .RequestClientCredentialsTokenAsync(new ClientCredentialsTokenRequest
        {
          Address = $"{STS_HOST}/connect/token",
          ClientId = "console_client",
          ClientSecret = "00000000-0000-0000-0000-000000000001",
          Scope = "webapi_scope"
        });

      // all good?
      if (!response.IsError)
      {
        Console.ForegroundColor = ConsoleColor.Green;
        Console.WriteLine();
        Console.WriteLine("SUCCESS!!");
        Console.WriteLine();
        Console.WriteLine("Access Token: ");
        Console.WriteLine(response.AccessToken);

        httpClient.SetBearerToken(response.AccessToken);

        var stepperAmount = args.Length == 1 ? int.Parse(args[0]) : AMOUNT_OF_STEPPERS;
        var steppers = GetSteppers(stepperAmount);
        foreach (var stepper in steppers)
        {
          var createStepperResponse = await CreateStepper(httpClient, stepper);
          if (createStepperResponse.IsSuccessStatusCode)
          {
            var content = await createStepperResponse.Content.ReadAsStringAsync();

            var stepperId = int.Parse(content);
            var processStepperResponse = await ProcessStepper(httpClient, stepperId);
            if (processStepperResponse.IsSuccessStatusCode)
            {
              Console.WriteLine($"Workflow for stepper id {stepperId} started...");
            }
          }
        }
{'fraction_non_alphanumeric': 0.09354497354497354, 'fraction_numerical': 0.018624338624338623, 'mean_word_length': 2.795983935742972, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, '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': '5915519', 'n_tokens_mistral': 1305, 'n_tokens_neox': 1209, 'n_words': 276}