How to use formulas - 10 common examples

To help you get started, we’ve selected a few formulas examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sagefy / sagefy / simulation / gands_tests.py View on Github external
def guess_likelihood(score, guess, slip, learned):
    if score == 1:
        return calculate_correct(1, slip, learned)
    if score == 0:
        return calculate_incorrect(1, slip, learned)
github sagefy / sagefy / simulation / gands_tests.py View on Github external
def guess_normal(score, guess, slip, learned):
    if score == 1:
        return calculate_correct(guess, slip, learned)
    if score == 0:
        return calculate_incorrect(guess, slip, learned)
github sagefy / sagefy / simulation / gands_tests.py View on Github external
def slip_likelihood(score, guess, slip, learned):
    if score == 1:
        return calculate_correct(guess, 1, learned)
    if score == 0:
        return calculate_incorrect(guess, 1, learned)
github sagefy / sagefy / simulation / gands_tests.py View on Github external
def slip_normal(score, guess, slip, learned):
    if score == 1:
        return calculate_correct(guess, slip, learned)
    if score == 0:
        return calculate_incorrect(guess, slip, learned)
github sagefy / sagefy / simulation / gands_tests.py View on Github external
def slip_normal(score, guess, slip, learned):
    if score == 1:
        return calculate_correct(guess, slip, learned)
    if score == 0:
        return calculate_incorrect(guess, slip, learned)
github sagefy / sagefy / simulation / gands_tests.py View on Github external
def guess_likelihood(score, guess, slip, learned):
    if score == 1:
        return calculate_correct(1, slip, learned)
    if score == 0:
        return calculate_incorrect(1, slip, learned)
github sagefy / sagefy / simulation / gands_tests.py View on Github external
def guess_normal(score, guess, slip, learned):
    if score == 1:
        return calculate_correct(guess, slip, learned)
    if score == 0:
        return calculate_incorrect(guess, slip, learned)
github sagefy / sagefy / simulation / gands_tests.py View on Github external
def slip_likelihood(score, guess, slip, learned):
    if score == 1:
        return calculate_correct(guess, 1, learned)
    if score == 0:
        return calculate_incorrect(guess, 1, learned)
github stackdio / stackdio / stackdio / formulas / tasks.py View on Github external
def __init__(self, formula, error):
        formula.set_status(Formula.ERROR, error)
        super(FormulaTaskException, self).__init__(error)
github stackdio / stackdio / stackdio / formulas / tasks.py View on Github external
@celery.task(name='formulas.update_formula')  # NOQA
def update_formula(formula_id, git_password):
    try:
        formula = Formula.objects.get(pk=formula_id)
        formula.set_status(Formula.IMPORTING, 'Updating formula.')

        repodir = clone_to_temp(formula, git_password)

        formula_title, formula_description, root_path, components = validate_specfile(formula, repodir)

        old_components = formula.components.all()

        # Check for added or changed components
        added_components = []
        changed_components = []
        removed_components = []

        for component in components:

            # Check to see if the component was already in the formula
            exists = False