This file contains 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 rest_framework import serializers | |
from rest_framework.fields import empty | |
from rest_framework.utils import html | |
class CharacterSeparatedField(serializers.ListField): | |
""" | |
Character separated ListField. | |
Based on https://gist.github.com/jpadilla/8792723. |
This file contains 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
""" | |
Calculate second lowest cost silver plan (SLCSP) and produce result.csv. | |
""" | |
import csv | |
from collections import defaultdict | |
def get_slcsp_zipcodes(): | |
"""Get all zipcodes for slcsp research.""" |
This file contains 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
# coding: utf-8 | |
from __future__ import unicode_literals, absolute_import | |
from django.http.response import HttpResponseForbidden, HttpResponseRedirect | |
from django.views.generic.base import TemplateResponseMixin, ContextMixin | |
from django.views.generic.edit import ProcessFormView | |
class MultiFormMixin(ContextMixin): |
This file contains 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
import os | |
import sys | |
import django | |
print('Django %s' % django.get_version()) | |
sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS]) | |
sys.path.extend(['/Applications/PyCharm CE.app/Contents/helpers']) | |
sys.path.extend(['/Applications/PyCharm CE.app/Contents/helpers/pycharm']) | |
if 'setup' in dir(django): django.setup() | |
PROJECT_ROOT = WORKING_DIR_AND_PYTHON_PATHS | |
import django_manage_shell; django_manage_shell.run(PROJECT_ROOT) |