<commit_before>﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Numerics;
using System.Reflection;
using DynamixelServo.Driver;
using DynamixelServo.Quadruped;
using Newtonsoft.Json;

namespace DynamixelServo.NetCore.TestConsole
{
    class Program
    {
        static void Main(string[] args)
        {
            Directory.SetCurrentDirectory(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location));
            Console.WriteLine("Starting");
            using (var driver = new DynamixelDriver("COM4"))
            using (var quadruped = new QuadrupedIkDriver(driver))
            {
                LoadLimits(driver);
                using (var gaiteEngine = new BasicQuadrupedGaitEngine(quadruped))
                {
                    bool keepGoing = true;
                    LegFlags nextLegCombo = LegFlags.RfLrCross;
                    while (keepGoing)
                    {
                        nextLegCombo = nextLegCombo == LegFlags.RfLrCross ? LegFlags.LfRrCross : LegFlags.RfLrCross;
                        Vector2 direction = Vector2.Zero;
                        ConsoleKeyInfo keyInfo = GetCurrentConsoleKey();
                        switch (keyInfo.Key)
                        {
                            case ConsoleKey.LeftArrow:
                            case ConsoleKey.A:
                                direction = new Vector2(-1, 0);
                                break;
                            case ConsoleKey.RightArrow:
                            case ConsoleKey.D:
                                direction = new Vector2(1, 0);
                                break;
                            case ConsoleKey.UpArrow:
                            case ConsoleKey.W:
                                direction = new Vector2(0, 1);
                                break;
                            case ConsoleKey.DownArrow:
                            case ConsoleKey.S:
                                direction = new Vector2(0, -1);
                                break;<commit_msg>Add option to pass port name as a parameter<commit_after>﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Numerics;
using System.Reflection;
using DynamixelServo.Driver;
using DynamixelServo.Quadruped;
using Newtonsoft.Json;

namespace DynamixelServo.NetCore.TestConsole
{
    class Program
    {
        static void Main(string[] args)
        {
            Directory.SetCurrentDirectory(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location));
            Console.WriteLine("Starting");
            using (var driver = new DynamixelDriver(args.Length > 0 ? args[0] : "COM4"))
            using (var quadruped = new QuadrupedIkDriver(driver))
            {
                LoadLimits(driver);
                using (var gaiteEngine = new BasicQuadrupedGaitEngine(quadruped))
                {
                    bool keepGoing = true;
                    LegFlags nextLegCombo = LegFlags.RfLrCross;
                    while (keepGoing)
                    {
                        nextLegCombo = nextLegCombo == LegFlags.RfLrCross ? LegFlags.LfRrCross : LegFlags.RfLrCross;
                        Vector2 direction = Vector2.Zero;
                        ConsoleKeyInfo keyInfo = GetCurrentConsoleKey();
                        switch (keyInfo.Key)
                        {
                            case ConsoleKey.LeftArrow:
                            case ConsoleKey.A:
                                direction = new Vector2(-1, 0);
                                break;
                            case ConsoleKey.RightArrow:
                            case ConsoleKey.D:
                                direction = new Vector2(1, 0);
                                break;
                            case ConsoleKey.UpArrow:
                            case ConsoleKey.W:
                                direction = new Vector2(0, 1);
                                break;
                            case ConsoleKey.DownArrow:
                            case ConsoleKey.S:
                                direction = new Vector2(0, -1);
                                break;
{'fraction_non_alphanumeric': 0.06707897240723121, 'fraction_numerical': 0.007611798287345386, 'mean_word_length': 1.1630658436213992, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '6429938', 'n_tokens_mistral': 1008, 'n_tokens_neox': 947, 'n_words': 208}