<commit_before>using System;
using System.Runtime.InteropServices;

public class WindowRectGetter
{
    [DllImport("user32.dll")]
    //[return: MarshalAs(UnmanagedType.Bool)]
    public static extern bool GetWindowRect(IntPtr hWnd, out WindowRectRaw lpRect);

    [DllImport("user32.dll")]
    public static extern IntPtr GetForegroundWindow();

    public static WindowRect GetForegroundWindowRect() {
        IntPtr hwnd = GetForegroundWindow();
        var rawRect = new WindowRectRaw();
        GetWindowRect(hwnd, out rawRect);
        return new WindowRect(rawRect);
    }
}

public struct WindowRectRaw
{
    public int left;
    public int top;
    public int right;
    public int bottom;
}

public class WindowRect
{
    public int x;
    public int y;
    public int width;
    public int height;

    public WindowRect(WindowRectRaw raw) {
        this.x = raw.left;
        this.y = raw.top;
        this.width = raw.right - raw.left;
        this.height = raw.bottom - raw.top;
    }
}<commit_msg>Formatting<commit_after>using System;
using System.Runtime.InteropServices;

public class WindowRectGetter
{
    [DllImport("user32.dll")]
    public static extern bool GetWindowRect(IntPtr hWnd, out WindowRectRaw lpRect);

    [DllImport("user32.dll")]
    public static extern IntPtr GetForegroundWindow();

    public static WindowRect GetForegroundWindowRect()
    {
        IntPtr hwnd = GetForegroundWindow();
        var rawRect = new WindowRectRaw();
        GetWindowRect(hwnd, out rawRect);
        return new WindowRect(rawRect);
    }
}

public struct WindowRectRaw
{
    public int left;
    public int top;
    public int right;
    public int bottom;
}

public class WindowRect
{
    public int x;
    public int y;
    public int width;
    public int height;

    public WindowRect(WindowRectRaw raw)
    {
        this.x = raw.left;
        this.y = raw.top;
        this.width = raw.right - raw.left;
        this.height = raw.bottom - raw.top;
    }
}
{'fraction_non_alphanumeric': 0.0897629853756934, 'fraction_numerical': 0.004034291477559254, 'mean_word_length': 2.83011583011583, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2238604', 'n_tokens_mistral': 605, 'n_tokens_neox': 595, 'n_words': 168}