<commit_before>package de.doofmars.ghb;

import com.github.mikephil.charting.utils.ValueFormatter;

import java.text.DecimalFormat;

public class MyValueFormatter implements ValueFormatter {

    private DecimalFormat mFormat;
    
    public MyValueFormatter() {
        mFormat = new DecimalFormat("###,###,###,##0.0");
    }
    
    @Override
    public String getFormattedValue(float value) {
        return mFormat.format(value) + " $";
    }

}<commit_msg>Dataformatter to format for gb and mb and kb<commit_after>package de.doofmars.ghb;

import com.github.mikephil.charting.utils.ValueFormatter;

import java.text.DecimalFormat;

public class MyValueFormatter implements ValueFormatter {

    private DecimalFormat mFormat;
    private final long KB_FACTOR = 1024;
    private final long MB_FACTOR = 1048576;
    private final long GB_FACTOR = 1073741824;

    public MyValueFormatter() {
        mFormat = new DecimalFormat("#####.00");
    }
    
    @Override
    public String getFormattedValue(float value) {
        if (value > GB_FACTOR) {
            return mFormat.format(value / GB_FACTOR) + " GB";
        } else if (value > MB_FACTOR) {
            return mFormat.format(value / MB_FACTOR) + " MB";
        } else {
            return mFormat.format(value / KB_FACTOR) + " KB";
        }
    }

}
{'fraction_non_alphanumeric': 0.10402429764616553, 'fraction_numerical': 0.018982536066818528, 'mean_word_length': 2.946107784431138, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5392028', 'n_tokens_mistral': 430, 'n_tokens_neox': 402, 'n_words': 93}