<commit_before>var tape = {
    head_at: 0,
    contents: [],

    load: function(contents) {
        contents = contents.replace(/\s/, "_");
        this.contents = contents.split("");
        this.seek(0);
    },

    write: function(value) {
        this.extend_to(this.head_at);
        this.contents[this.head_at] = value;
        this.render();
    },

    read: function() {
        this.extend_to(this.head_at);
        var value = this.contents[this.head_at] || "_";
        return value;
    },

    left: function() {
        this.head_at--;
        this.extend_to(this.head_at);
        this.render();
    },

    right: function() {
        this.head_at++;
        this.extend_to(this.head_at);
        this.render();
    },

    seek: function(position) {
        this.head_at = position;
        this.render();
    },

    render: function() {
        var cells = [];
        for (var i = 0; i < this.contents.length; i++) {
            var cell = $("<span class='cell'></span>");
            cell.text(this.contents[i]);
            if (this.head_at === i) {
                cell.addClass("head");
            }
            cells.push(cell);
        }
        $("#tape").children().remove();
        $("#tape").append(cells);
		
		var returned = (this.head_at * 66) + 33;
		$("#tape").scrollLeft(returned);
    },
	
    /**
     * Extend the size of the tape to ensure that the head can point at index
     **/
    extend_to: function(index) {
        if (index === 0 && this.contents.length === 0) {
            this.contents.push("_");
            return;
        }
        while (index < 0) {
            this.contents.splice(0, 0, '_');<commit_msg>Tab width changes<commit_after>var tape = {
    head_at: 0,
    contents: [],

    load: function(contents) {
        contents = contents.replace(/\s/, "_");
        this.contents = contents.split("");
        this.seek(0);
    },

    write: function(value) {
        this.extend_to(this.head_at);
        this.contents[this.head_at] = value;
        this.render();
    },

    read: function() {
        this.extend_to(this.head_at);
        var value = this.contents[this.head_at] || "_";
        return value;
    },

    left: function() {
        this.head_at--;
        this.extend_to(this.head_at);
        this.render();
    },

    right: function() {
        this.head_at++;
        this.extend_to(this.head_at);
        this.render();
    },

    seek: function(position) {
        this.head_at = position;
        this.render();
    },

    render: function() {
        var cells = [];
        for (var i = 0; i < this.contents.length; i++) {
            var cell = $("<span class='cell'></span>");
            cell.text(this.contents[i]);
            if (this.head_at === i) {
                cell.addClass("head");
            }
            cells.push(cell);
        }
        $("#tape").children().remove();
        $("#tape").append(cells);	
	var returned = (this.head_at * 66) + 33;
	$("#tape").scrollLeft(returned);
    },
	
    /**
     * Extend the size of the tape to ensure that the head can point at index
     **/
    extend_to: function(index) {
        if (index === 0 && this.contents.length === 0) {
            this.contents.push("_");
            return;
        }
        while (index < 0) {
            this.contents.splice(0, 0, '_');
{'fraction_non_alphanumeric': 0.16906474820143885, 'fraction_numerical': 0.007194244604316547, 'mean_word_length': 1.751030502885408, 'pattern_counts': {'":': 0, '<': 11, '<?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': '3473741', 'n_tokens_mistral': 1069, 'n_tokens_neox': 1029, 'n_words': 200}