<commit_before>declare var famous: any;

export class $famous
{

    static instance: $famous;
    static isCreating: Boolean = false;
    engine: Object;
    scene: Object;

    constructor() {

        if (!$famous.isCreating) {
            throw new Error("$famous is a singleton. Call $famous.get() instead.");
        }

        this.engine = famous.core.FamousEngine;
        this.scene = this.engine.createScene();
        this.engine.init();

    }

    static get() {

        if ($famous.instance == null) {
            $famous.isCreating = true;
            $famous.instance = new $famous();
            $famous.isCreating = false;
        }

        return $famous.instance;

    }

}<commit_msg>Removed uncessary logic in  singleton<commit_after>declare var famous: any;

export class $famous
{

    static instance: $famous;
    static created: Boolean = false;
    engine: Object;
    scene: Object;

    constructor() {

        if (!$famous.created) {
            throw new Error("$famous is a singleton. Call $famous.get() instead.");
        }

        this.engine = famous.core.FamousEngine;
        this.scene = this.engine.createScene();
        this.engine.init();

    }

    static get() {

        if ($famous.instance == null) {
            $famous.instance = new $famous();
            this.created = true;
        }
        return $famous.instance;

    }

}
{'fraction_non_alphanumeric': 0.1232876712328767, 'fraction_numerical': 0.0, 'mean_word_length': 1.9978401727861772, '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': '3064004', 'n_tokens_mistral': 427, 'n_tokens_neox': 402, 'n_words': 100}