<commit_before>from common import *
from secret_settings import *

DEV_BOX = True

EARLY_BADGE_PRICE = 40
LATE_BADGE_PRICE  = 45
DOOR_BADGE_PRICE  = 60

EARLY_GROUP_PRICE = 30
LATE_GROUP_PRICE  = 35

class State:
    SEND_EMAILS = True
    
    AT_THE_CON = False
    POST_CON = False
    UBER_SHUT_DOWN = False
    HIDE_SCHEDULE = False
    
    PREREG_CLOSED = False
    PREREG_NOT_OPEN_YET = True
    SUP_REG_OPEN = True
    GROUP_REG_OPEN = True
    DEALER_WAITLIST_CLOSED = False
    ETCHED_BADGES_ORDERED = False
    
    STAFFERS_IMPORTED    = datetime(2013,  6, 18)
    SHIFTS_CREATED       = datetime(2013,  9,  1)
    PRICE_BUMP           = datetime(2013, 10, 31, 23, 59)
    DEALER_REG_START     = datetime(2013,  8,  1, 11, 59)
    DEALER_REG_DEADLINE  = datetime(2013,  9, 30, 11, 59)
    DEALER_REG_SHUTDOWN  = datetime(2013, 10, 30, 11, 59)
    DEALER_PAYMENT_DUE   = datetime(2013, 11, 30, 23, 59)
    ROOM_DEADLINE        = datetime(2013, 12,  1, 23, 59)
    STAFF_BADGE_DEADLINE = datetime(2013, 12,  9, 23, 59)
    PREREG_TAKEDOWN      = datetime(2013, 12, 23, 23, 59)
    PLACEHOLDER_DEADLINE = datetime(2013, 12, 30, 23, 59)
    UBER_TAKEDOWN        = datetime(2013, 12, 30, 23, 59)
    EPOCH                = datetime(2014,  1,  2,  8)
    ESCHATON             = datetime(2014,  1,  5, 22)
    
    PATH     = "/magfest"
    HOSTNAME = "magfestubersystem.com"
    
    @property
    def URL_BASE(self):
        return "http://" + self.HOSTNAME + self.PATH
    
    @property
    def DEALER_REG_OPEN(self):
        return self.DEALER_REG_START < datetime.now() < self.DEALER_REG_SHUTDOWN
    
    @property
    def BADGE_PRICE(self):
        if datetime.now() < self.PRICE_BUMP:
            return EARLY_BADGE_PRICE
        elif state.AT_THE_CON:
            return DOOR_BADGE_PRICE
        else:
            return LATE_BADGE_PRICE
    
    @property
    def GROUP_PRICE(self):
        if datetime.now() < state.PRICE_BUMP:
            return EARLY_GROUP_PRICE
        else:
            return LATE_GROUP_PRICE
    
    @property
    def PREREG_BADGE_TYPES(self):
        types = [ATTENDEE_BADGE]
        for reg_open,badge_type in [(self.DEALER_REG_OPEN, PSEUDO_DEALER_BADGE),
                                    (self.GROUP_REG_OPEN,  PSEUDO_GROUP_BADGE)]:
            if reg_open:
                types.append(badge_type)
        return types
    
    @property
    def SHIFTS_AVAILABLE(self):
        return datetime.now() > self.SHIFTS_CREATED
    
    @property
    def ROOMS_AVAILABLE(self):
        return datetime.now() < state.ROOM_DEADLINE
    
    @property
    def DEALER_REG_FULL(self):
        return datetime.now() > self.DEALER_REG_DEADLINE
    
    @property
    def CUSTOM_BADGES_ORDERED(self):
        return datetime.now() > self.STAFF_BADGE_DEADLINE

state = State()

SHIRT_LEVEL = 20
SUPPORTER_LEVEL = 60
SEASON_LEVEL = 150
DONATION_TIERS = {
    0: "No thanks",
    5: "'Friend of MAGFest' ribbon",
    10: "button",
    SHIRT_LEVEL: "tshirt",
    40: "$10 in Mpoints",
    SUPPORTER_LEVEL: "Supporter Package",
    80: "pin",
    100: "'Don't ask what I had to do to get this ribbon'",
    125: "$0.000000001 Mpoint coin",
    SEASON_LEVEL: "Supporter Season's Pass for 2014",
    200: "Tiara"
}
DONATION_OPTS = sorted((amt, "${}: {}".format(amt,desc) if amt else desc) for amt,desc in DONATION_TIERS.items())

def enum(**kwargs):
    decl_sort = kwargs.pop("_sort_by_declaration", False)
    if decl_sort:
        with open(__file__) as f:
            lines = f.readlines()
        def _line(tup):
            for i,line in enumerate(lines):
                if tup[0] in line:
                    return i
    xs = []
    for name,desc in kwargs.items():
        val = int(sha512(name.encode()).hexdigest()[:7], 16)
        globals()[name] = val
        xs.append((name, val, desc))
    return [x[1:] for x in sorted(xs, key = _line if decl_sort else lambda tup: tup[2])]

ONEDAY_BADGE_PRICE = 35
DEALER_BADGE_PRICE = 30
TABLE_PRICES       = "$120 for the first table, $160 for the second table, $200 for each additional table"

ADMIN_EMAIL = "<NAME> <<EMAIL>>"
REGDESK_EMAIL = "<NAME> <<EMAIL>>"
STAFF_EMAIL = "<NAME> <<EMAIL>>"
MARKETPLACE_EMAIL = "<NAME> <<EMAIL>>"
PANELS_EMAIL = "<EMAIL>"
REG_EMAILS = [ADMIN_EMAIL]
PAYMENT_BCC = [ADMIN_EMAIL]

CONSENT_FORM_URL  = state.URL_BASE + "/static/MinorConsentForm.pdf"<commit_msg>#17: added plus sign to donation descriptions<commit_after>from common import *
from secret_settings import *

DEV_BOX = True

EARLY_BADGE_PRICE = 40
LATE_BADGE_PRICE  = 45
DOOR_BADGE_PRICE  = 60

EARLY_GROUP_PRICE = 30
LATE_GROUP_PRICE  = 35

class State:
    SEND_EMAILS = True
    
    AT_THE_CON = False
    POST_CON = False
    UBER_SHUT_DOWN = False
    HIDE_SCHEDULE = False
    
    PREREG_CLOSED = False
    PREREG_NOT_OPEN_YET = True
    SUP_REG_OPEN = True
    GROUP_REG_OPEN = True
    DEALER_WAITLIST_CLOSED = False
    ETCHED_BADGES_ORDERED = False
    
    STAFFERS_IMPORTED    = datetime(2013,  6, 18)
    SHIFTS_CREATED       = datetime(2013,  9,  1)
    PRICE_BUMP           = datetime(2013, 10, 31, 23, 59)
    DEALER_REG_START     = datetime(2013,  8,  1, 11, 59)
    DEALER_REG_DEADLINE  = datetime(2013,  9, 30, 11, 59)
    DEALER_REG_SHUTDOWN  = datetime(2013, 10, 30, 11, 59)
    DEALER_PAYMENT_DUE   = datetime(2013, 11, 30, 23, 59)
    ROOM_DEADLINE        = datetime(2013, 12,  1, 23, 59)
    STAFF_BADGE_DEADLINE = datetime(2013, 12,  9, 23, 59)
    PREREG_TAKEDOWN      = datetime(2013, 12, 23, 23, 59)
    PLACEHOLDER_DEADLINE = datetime(2013, 12, 30, 23, 59)
    UBER_TAKEDOWN        = datetime(2013, 12, 30, 23, 59)
    EPOCH                = datetime(2014,  1,  2,  8)
    ESCHATON             = datetime(2014,  1,  5, 22)
    
    PATH     = "/magfest"
    HOSTNAME = "magfestubersystem.com"
    
    @property
    def URL_BASE(self):
        return "http://" + self.HOSTNAME + self.PATH
    
    @property
    def DEALER_REG_OPEN(self):
        return self.DEALER_REG_START < datetime.now() < self.DEALER_REG_SHUTDOWN
    
    @property
    def BADGE_PRICE(self):
        if datetime.now() < self.PRICE_BUMP:
            return EARLY_BADGE_PRICE
        elif state.AT_THE_CON:
            return DOOR_BADGE_PRICE
        else:
            return LATE_BADGE_PRICE
    
    @property
    def GROUP_PRICE(self):
        if datetime.now() < state.PRICE_BUMP:
            return EARLY_GROUP_PRICE
        else:
            return LATE_GROUP_PRICE
    
    @property
    def PREREG_BADGE_TYPES(self):
        types = [ATTENDEE_BADGE]
        for reg_open,badge_type in [(self.DEALER_REG_OPEN, PSEUDO_DEALER_BADGE),
                                    (self.GROUP_REG_OPEN,  PSEUDO_GROUP_BADGE)]:
            if reg_open:
                types.append(badge_type)
        return types
    
    @property
    def SHIFTS_AVAILABLE(self):
        return datetime.now() > self.SHIFTS_CREATED
    
    @property
    def ROOMS_AVAILABLE(self):
        return datetime.now() < state.ROOM_DEADLINE
    
    @property
    def DEALER_REG_FULL(self):
        return datetime.now() > self.DEALER_REG_DEADLINE
    
    @property
    def CUSTOM_BADGES_ORDERED(self):
        return datetime.now() > self.STAFF_BADGE_DEADLINE

state = State()

SHIRT_LEVEL = 20
SUPPORTER_LEVEL = 60
SEASON_LEVEL = 160
DONATION_TIERS = {
    0: "No thanks",
    5: "'Friend of MAGFest' ribbon",
    10: "button",
    SHIRT_LEVEL: "tshirt",
    40: "$10 in Mpoints",
    SUPPORTER_LEVEL: "Supporter Package",
    80: "pin",
    100: "'Don't ask what I had to do to get this ribbon'",
    120: "$0.000000001 Mpoint coin",
    SEASON_LEVEL: "Season Supporter Pass for 2014",
    200: "Tiara"
}
DONATION_OPTS = sorted((amt, "+ ${}: {}".format(amt,desc) if amt else desc) for amt,desc in DONATION_TIERS.items())

def enum(**kwargs):
    decl_sort = kwargs.pop("_sort_by_declaration", False)
    if decl_sort:
        with open(__file__) as f:
            lines = f.readlines()
        def _line(tup):
            for i,line in enumerate(lines):
                if tup[0] in line:
                    return i
    xs = []
    for name,desc in kwargs.items():
        val = int(sha512(name.encode()).hexdigest()[:7], 16)
        globals()[name] = val
        xs.append((name, val, desc))
    return [x[1:] for x in sorted(xs, key = _line if decl_sort else lambda tup: tup[2])]

ONEDAY_BADGE_PRICE = 35
DEALER_BADGE_PRICE = 30
TABLE_PRICES       = "$120 for the first table, $160 for the second table, $200 for each additional table"

ADMIN_EMAIL = "<NAME> <<EMAIL>>"
REGDESK_EMAIL = "<NAME> <<EMAIL>>"
STAFF_EMAIL = "<NAME> <<EMAIL>>"
MARKETPLACE_EMAIL = "<NAME> <<EMAIL>>"
PANELS_EMAIL = "<EMAIL>"
REG_EMAILS = [ADMIN_EMAIL]
PAYMENT_BCC = [ADMIN_EMAIL]

CONSENT_FORM_URL  = state.URL_BASE + "/static/MinorConsentForm.pdf"
{'fraction_non_alphanumeric': 0.10402913726382881, 'fraction_numerical': 0.049169132711131346, 'mean_word_length': 2.5603727714748783, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2426316', 'n_tokens_mistral': 3649, 'n_tokens_neox': 3260, 'n_words': 731}