<commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import

from .celery import *  # NOQA
import os
import json

# Project apps
INSTALLED_APPS += (
    'oet2.jobs',
    'oet2.tasks',
    'oet2.api',
    'oet2.ui',
    'oet2.utils',
    'eventkit_cloud'
)

INSTALLED_APPS += ("osgeo_importer", "djmp", "guardian")

INSTALLED_APPS += ("djcelery", )
import djcelery
djcelery.setup_loader()

LOGIN_URL = '/login/'

EXPORT_TASKS = {
    'shp': 'oet2.tasks.export_tasks.ShpExportTask',
    'obf': 'oet2.tasks.export_tasks.ObfExportTask',
    'sqlite': 'oet2.tasks.export_tasks.SqliteExportTask',
    'kml': 'oet2.tasks.export_tasks.KmlExportTask',
    'thematic': 'oet2.tasks.export_tasks.ThematicLayersExportTask',
    'gpkg': 'oet2.tasks.export_tasks.GeopackageExportTask'
}

# where exports are staged for processing
EXPORT_STAGING_ROOT = os.getenv('EXPORT_STAGING_ROOT', '/var/lib/eventkit/exports_stage/')

# where exports are stored for public download
EXPORT_DOWNLOAD_ROOT = os.getenv(''EXPORT_DOWNLOAD_ROOT', '/var/lib/eventkit/exports_download/')

# the root url for export downloads
EXPORT_MEDIA_ROOT = os.getenv('EXPORT_MEDIA_ROOT', '/downloads/')

# home dir of the OSMAnd Map Creator
OSMAND_MAP_CREATOR_DIR = os.getenv('OSMAND_MAP_CREATOR_DIR', '/var/lib/eventkit/OsmAndMapCreator')

# location of the garmin config file
GARMIN_CONFIG = os.getenv('GARMIN_CONFIG', '/var/lib/eventkit/conf/garmin_config.xml')

# url to overpass api endpoint
# OVERPASS_API_URL = 'http://cloud.eventkit.dev/overpass-api/interpreter'
OVERPASS_API_URL = os.getenv('OVERPASS_API_URL', 'http://overpass-api.de/api/interpreter')

"""
Maximum extent of a Job
max of (latmax-latmin) * (lonmax-lonmin)
"""
JOB_MAX_EXTENT = 2500000  # default export max extent in sq km

# maximum number of runs to hold for each export
EXPORT_MAX_RUNS = 5

if os.environ.get('VCAP_APPLICATION'):
    env = json.loads(os.environ.get('VCAP_APPLICATION'))<commit_msg>fix syntax error<commit_after># -*- coding: utf-8 -*-
from __future__ import absolute_import

from .celery import *  # NOQA
import os
import json

# Project apps
INSTALLED_APPS += (
    'oet2.jobs',
    'oet2.tasks',
    'oet2.api',
    'oet2.ui',
    'oet2.utils',
    'eventkit_cloud'
)

INSTALLED_APPS += ("osgeo_importer", "djmp", "guardian")

INSTALLED_APPS += ("djcelery", )
import djcelery
djcelery.setup_loader()

LOGIN_URL = '/login/'

EXPORT_TASKS = {
    'shp': 'oet2.tasks.export_tasks.ShpExportTask',
    'obf': 'oet2.tasks.export_tasks.ObfExportTask',
    'sqlite': 'oet2.tasks.export_tasks.SqliteExportTask',
    'kml': 'oet2.tasks.export_tasks.KmlExportTask',
    'thematic': 'oet2.tasks.export_tasks.ThematicLayersExportTask',
    'gpkg': 'oet2.tasks.export_tasks.GeopackageExportTask'
}

# where exports are staged for processing
EXPORT_STAGING_ROOT = os.getenv('EXPORT_STAGING_ROOT', '/var/lib/eventkit/exports_stage/')

# where exports are stored for public download
EXPORT_DOWNLOAD_ROOT = os.getenv('EXPORT_DOWNLOAD_ROOT', '/var/lib/eventkit/exports_download/')

# the root url for export downloads
EXPORT_MEDIA_ROOT = os.getenv('EXPORT_MEDIA_ROOT', '/downloads/')

# home dir of the OSMAnd Map Creator
OSMAND_MAP_CREATOR_DIR = os.getenv('OSMAND_MAP_CREATOR_DIR', '/var/lib/eventkit/OsmAndMapCreator')

# location of the garmin config file
GARMIN_CONFIG = os.getenv('GARMIN_CONFIG', '/var/lib/eventkit/conf/garmin_config.xml')

# url to overpass api endpoint
# OVERPASS_API_URL = 'http://cloud.eventkit.dev/overpass-api/interpreter'
OVERPASS_API_URL = os.getenv('OVERPASS_API_URL', 'http://overpass-api.de/api/interpreter')

"""
Maximum extent of a Job
max of (latmax-latmin) * (lonmax-lonmin)
"""
JOB_MAX_EXTENT = 2500000  # default export max extent in sq km

# maximum number of runs to hold for each export
EXPORT_MAX_RUNS = 5

if os.environ.get('VCAP_APPLICATION'):
    env = json.loads(os.environ.get('VCAP_APPLICATION'))
{'fraction_non_alphanumeric': 0.13379558294812532, 'fraction_numerical': 0.01027221366204417, 'mean_word_length': 5.001540832049306, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2471826', 'n_tokens_mistral': 1504, 'n_tokens_neox': 1441, 'n_words': 277}