def sample_is_active(sample_name):
    from .models import cache_sample, Sample
    from .compat import cache

    sample = cache.get(keyfmt(get_setting('SAMPLE_CACHE_KEY'), sample_name))
    if sample is None:
        try:
            sample = Sample.objects.get(name=sample_name)
            cache_sample(instance=sample)
        except Sample.DoesNotExist:
            return get_setting('SAMPLE_DEFAULT')

    return sample.percent <= Decimal(str(random.uniform(0, 100)))
dataset/ETHPy150Open jsocol/django-waffle/waffle/__init__.py/sample_is_active/swapped operands of `<=`