<commit_before>#!/usr/bin/env python

import os
import re
import warnings
from six import PY2

if PY2:
    from urlparse import urlparse
else:
    from urllib.parse import urlparse

from . import env


HEROKU_POSTGRES_ENV_NAME_RE = re.compile('HEROKU_POSTGRESQL_[A-Z_]*URL')


def from_heroku_envvars(config):
        var_map = {
            # SQL-Alchemy
            'DATABASE_URL': 'SQLALCHEMY_DATABASE_URI',

            # Celery w/ RabbitMQ
            'BROKER_URL': 'RABBITMQ_URL',

            'REDISTOGO_URL': 'REDIS_URL',
            'MONGOLAB_URI': 'MONGO_URI',
            'MONGOHQ_URL': 'MONGO_URI',
            'CLOUDANT_URL': 'COUCHDB_URL',

            'MEMCACHIER_SERVERS': 'CACHE_MEMCACHED_SERVERS',
            'MEMCACHIER_USERNAME': 'CACHE_MEMCACHED_USERNAME',<commit_msg>Use six.moves when importing.<commit_after>#!/usr/bin/env python

import os
import re
import warnings
from six.moves.urllib_parse import urlparse

from . import env


HEROKU_POSTGRES_ENV_NAME_RE = re.compile('HEROKU_POSTGRESQL_[A-Z_]*URL')


def from_heroku_envvars(config):
        var_map = {
            # SQL-Alchemy
            'DATABASE_URL': 'SQLALCHEMY_DATABASE_URI',

            # Celery w/ RabbitMQ
            'BROKER_URL': 'RABBITMQ_URL',

            'REDISTOGO_URL': 'REDIS_URL',
            'MONGOLAB_URI': 'MONGO_URI',
            'MONGOHQ_URL': 'MONGO_URI',
            'CLOUDANT_URL': 'COUCHDB_URL',

            'MEMCACHIER_SERVERS': 'CACHE_MEMCACHED_SERVERS',
            'MEMCACHIER_USERNAME': 'CACHE_MEMCACHED_USERNAME',
{'fraction_non_alphanumeric': 0.10371819960861056, 'fraction_numerical': 0.001304631441617743, 'mean_word_length': 2.750611246943765, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '740534', 'n_tokens_mistral': 595, 'n_tokens_neox': 561, 'n_words': 93}