This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db.models import SubfieldBase | |
from django.db.models.fields import PositiveIntegerField | |
class MultipleOptions(object): | |
def __init__(self, options, value=None): | |
self.options = options | |
try: | |
self._value = int(value) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def enem2ufmg(nota): | |
if 0 <= nota <= 118.2600: | |
resultado = 0.005306951 * nota | |
elif 118.2600 < nota < 936.1355: | |
resultado = 0.0 | |
resultado += -1.7988096645 * nota | |
resultado += (4.18317311423 / 10 ** 2) * nota ** 2 | |
resultado -= (4.01229829463 / 10 ** 4) * nota ** 3 |
NewerOlder