<commit_before>module('users.timfelgentreff.babelsberg.cassowary_ext').requires('users.timfelgentreff.cassowary.DwarfCassowary').toRun(function() {

Function.addMethods({
    shouldBeTrue: function (priority, ctx) {
        if (!ctx) {
            ctx = priority;
            priority = undefined;
        }
        return ClSimplexSolver.getInstance().always({priority: priority, ctx: ctx}, this);
    }
})

ClSimplexSolver.addMethods({
    isConstraintObject: function() {
        return true;
    },
    constraintVariableFor: function(value, ivarname) {
        if ((typeof(value) == "number") || (value === null) || (value instanceof Number)) {
            var v = new ClVariable(value + 0 /* coerce back into primitive */);
            v.solver = this;
            v.stay();
            return v;
        } else {
            return null;
        }
    },
    get strength() {
        return ClStrength;
    },
    weight: 1000,
    always: function (opts, func) {
        var ctx = opts.ctx,
            priority = this.strength[opts.priority];
        func.varMapping = ctx;
        var constraint = new Constraint(func, this);
        constraint.priority = priority;
        constraint.enable();
        return constraint;
    }
});

Object.extend(ClSimplexSolver, {
    getInstance: function() {
        if (!this["$$instance"]) {
            this["$$instance"] = new ClSimplexSolver();
            this["$$instance"].setAutosolve(false);
        }
        return this["$$instance"];
    },
<commit_msg>added postponeEnabling flag to cassowary<commit_after>module('users.timfelgentreff.babelsberg.cassowary_ext').requires('users.timfelgentreff.cassowary.DwarfCassowary').toRun(function() {

Function.addMethods({
    shouldBeTrue: function (priority, ctx) {
        if (!ctx) {
            ctx = priority;
            priority = undefined;
        }
        return ClSimplexSolver.getInstance().always({priority: priority, ctx: ctx}, this);
    }
})

ClSimplexSolver.addMethods({
    isConstraintObject: function() {
        return true;
    },
    constraintVariableFor: function(value, ivarname) {
        if ((typeof(value) == "number") || (value === null) || (value instanceof Number)) {
            var v = new ClVariable(value + 0 /* coerce back into primitive */);
            v.solver = this;
            v.stay();
            return v;
        } else {
            return null;
        }
    },
    get strength() {
        return ClStrength;
    },
    weight: 1000,
    always: function (opts, func) {
        var ctx = opts.ctx,
            priority = this.strength[opts.priority];
        func.varMapping = ctx;
        var constraint = new Constraint(func, this);
        constraint.priority = priority;
        if(!opts.postponeEnabling) { constraint.enable(); }
        return constraint;
    }
});

Object.extend(ClSimplexSolver, {
    getInstance: function() {
        if (!this["$$instance"]) {
            this["$$instance"] = new ClSimplexSolver();
            this["$$instance"].setAutosolve(false);
        }
        return this["$$instance"];
    },

{'fraction_non_alphanumeric': 0.13553826199740596, 'fraction_numerical': 0.00324254215304799, 'mean_word_length': 2.285410010649627, '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': '5495520', 'n_tokens_mistral': 898, 'n_tokens_neox': 868, 'n_words': 183}