<commit_before>#include "graphics.h"
#include <stdlib.h>

static Window *s_window;

static GPath *s_my_path_ptr = NULL;

static const GPathInfo TOP_RIGHT_PATH = {
  .num_points = 2,
  //.points = (GPoint []) {{21, 0}, {14, 26}, {28, 26}, {7, 60}, {14, 34}, {0, 34}}
  .points = (GPoint []) {{72,3}, {141,3}}
};

static const GPathInfo RIGHT_PATH = {
  .num_points = 2,
  //.points = (GPoint []) {{21, 0}, {14, 26}, {28, 26}, {7, 60}, {14, 34}, {0, 34}}
  .points = (GPoint []) {{141,3}, {141,165}}
};

static const GPathInfo BOTTOM_PATH = {
  .num_points = 2,
  //.points = (GPoint []) {{21, 0}, {14, 26}, {28, 26}, {7, 60}, {14, 34}, {0, 34}}
  .points = (GPoint []) {{141,165}, {3,165}}
};

static const GPathInfo LEFT_PATH = {
  .num_points = 2,
  //.points = (GPoint []) {{21, 0}, {14, 26}, {28, 26}, {7, 60}, {14, 34}, {0, 34}}
  .points = (GPoint []) {{3,165}, {3,3}}
};

static const GPathInfo TOP_LEFT_PATH = {
  .num_points = 2,
  //.points = (GPoint []) {{21, 0}, {14, 26}, {28, 26}, {7, 60}, {14, 34}, {0, 34}}
  .points = (GPoint []) {{3,3}, {72,3}}
};

void graphics_draw_typical(GRect bounds, GContext *ctx, int pixels) {
    graphics_context_set_fill_color(ctx, GColorWhite);
    int offset = 9;
    int w = bounds.size.w, h = bounds.size.h;

    APP_LOG(APP_LOG_LEVEL_INFO, "Pixels: %d", pixels);

    GPoint corners[] = {{w/2,offset}, {w-offset, offset}, {w-offset,h-offset}, {offset,h-offset}, {offset,offset}, {w/2,offset}};
    int num_corners = 6;
    int last_corner = -1;
    for(int i=1; i<num_corners; ++i) {
        int distance = abs(corners[i].x - corners[i-1].x) + abs(corners[i].y - corners[i-1].y);
        if(pixels >= distance && last_corner == -1) {
            pixels -= distance;
        } else if(last_corner == -1){
            last_corner = i-1;
        }
    }


    APP_LOG(APP_LOG_LEVEL_INFO, "Last corner: %d", last_corner);
    APP_LOG(APP_LOG_LEVEL_INFO, "Pixels: %d", pixels);
    GPoint point = (GPoint){0,0};
    GPoint last = corners[last_corner];

    if(last.x == w-offset) {
        if(last.y == offset) {
            point.x = last.x;
            point.y = last.y + pixels;
        } else {
            point.x = last.x - pixels;
            point.y = last.y;
        }
    } else if(last.x == offset) {
        if(last.y == offset) {
            point.x = last.x + pixels;
            point.y = last.y;
        } else {
            point.x = last.x;
            point.y = last.y - pixels;
        }
    } else {
        point.x = last.x + pixels;
        point.y = last.y;
    }

    graphics_fill_circle(ctx, point, 2);

}
<commit_msg>fixed typical indicator<commit_after>#include "graphics.h"
#include <stdlib.h>

static Window *s_window;

static GPath *s_my_path_ptr = NULL;

static const GPathInfo TOP_RIGHT_PATH = {
  .num_points = 2,
  //.points = (GPoint []) {{21, 0}, {14, 26}, {28, 26}, {7, 60}, {14, 34}, {0, 34}}
  .points = (GPoint []) {{72,3}, {141,3}}
};

static const GPathInfo RIGHT_PATH = {
  .num_points = 2,
  //.points = (GPoint []) {{21, 0}, {14, 26}, {28, 26}, {7, 60}, {14, 34}, {0, 34}}
  .points = (GPoint []) {{141,3}, {141,165}}
};

static const GPathInfo BOTTOM_PATH = {
  .num_points = 2,
  //.points = (GPoint []) {{21, 0}, {14, 26}, {28, 26}, {7, 60}, {14, 34}, {0, 34}}
  .points = (GPoint []) {{141,165}, {3,165}}
};

static const GPathInfo LEFT_PATH = {
  .num_points = 2,
  //.points = (GPoint []) {{21, 0}, {14, 26}, {28, 26}, {7, 60}, {14, 34}, {0, 34}}
  .points = (GPoint []) {{3,165}, {3,3}}
};

static const GPathInfo TOP_LEFT_PATH = {
  .num_points = 2,
  //.points = (GPoint []) {{21, 0}, {14, 26}, {28, 26}, {7, 60}, {14, 34}, {0, 34}}
  .points = (GPoint []) {{3,3}, {72,3}}
};

void graphics_draw_typical(GRect bounds, GContext *ctx, int pixels) {
    graphics_context_set_fill_color(ctx, GColorWhite);
    int offset = 9;
    int w = bounds.size.w, h = bounds.size.h;

    APP_LOG(APP_LOG_LEVEL_INFO, "Pixels: %d", pixels);

    GPoint corners[] = {{w/2,offset}, {w-offset, offset}, {w-offset,h-offset}, {offset,h-offset}, {offset,offset}, {w/2,offset}};
    int num_corners = 6;
    int last_corner = -1;
    for(int i=1; i<num_corners; ++i) {
        int distance = abs(corners[i].x - corners[i-1].x) + abs(corners[i].y - corners[i-1].y);
        if(pixels >= distance && last_corner == -1) {
            pixels -= distance;
        } else if(last_corner == -1){
            last_corner = i-1;
        }
    }

    if(last_corner == -1) {
      last_corner = 5;
    }

    APP_LOG(APP_LOG_LEVEL_INFO, "Last corner: %d", last_corner);
    APP_LOG(APP_LOG_LEVEL_INFO, "Pixels: %d", pixels);
    GPoint point = (GPoint){0,0};
    GPoint last = corners[last_corner];

    if(last.x == w-offset) {
        if(last.y == offset) {
            point.x = last.x;
            point.y = last.y + pixels;
        } else {
            point.x = last.x - pixels;
            point.y = last.y;
        }
    } else if(last.x == offset) {
        if(last.y == offset) {
            point.x = last.x + pixels;
            point.y = last.y;
        } else {
            point.x = last.x;
            point.y = last.y - pixels;
        }
    } else {
        point.x = last.x + pixels;
        point.y = last.y;
    }

    graphics_fill_circle(ctx, point, 2);

}

{'fraction_non_alphanumeric': 0.2044978082713932, 'fraction_numerical': 0.062130741376024395, 'mean_word_length': 2.430065359477124, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1599732', 'n_tokens_mistral': 2319, 'n_tokens_neox': 2065, 'n_words': 492}