<commit_before>"Constants that will be used across files."

import os
import types

# Package type constants.
PACKAGE_ANY = 0
PACKAGE_WEBAPP = 8
PACKAGE_PACKAGED_WEBAPP = 9

JS_DEBUG = False
SPIDERMONKEY_INSTALLATION = os.environ.get("SPIDERMONKEY_INSTALLATION")

DEFAULT_WEBAPP_MRKT_URLS = ["https://marketplace.firefox.com",
                            "https://marketplace-dev.allizom.org"]
BUGZILLA_BUG = "https://bugzilla.mozilla.org/show_bug.cgi?id=%d"

DEFAULT_TIMEOUT = 60

DESCRIPTION_TYPES = types.StringTypes + (list, tuple)

# The maximum size of any string in JS analysis.
MAX_STR_SIZE = 1024 * 24  # 24KB

MAX_RESOURCE_SIZE = 2 * 1024 * 1024

ICON_LIMIT = 10

MAX_GARBAGE = 100 * 1024

# The permission sets are supersets of each other with
# certified > privileged > web. Prerelease permissions are special.
# There is no prerelease app type but privileged (and certified) apps can
# use prerelease permissions before we officially support them.
PERMISSIONS = {
    'web': set([
        'alarms', 'audio-capture', 'audio-channel-content',
        'audio-channel-normal', 'desktop-notification', 'fmradio',
        'geolocation', 'push', 'storage', 'video-capture'
    ]),
    'privileged': set([
        'audio-channel-alarm', 'audio-channel-notification', 'browser',
        'camera', 'contacts', 'device-storage:pictures',
        'device-storage:videos', 'device-storage:music',
        'device-storage:sdcard', 'feature-detection', 'input', 'mobileid',
        'mobilenetwork', 'nfc', 'speaker-control', 'systemXHR', 'tcp-socket',
        'udp-socket',
    ]),
    'certified': set([
        'attention', 'audio-channel-ringer', 'audio-channel-telephony',
        'audio-channel-publicnotification', 'background-sensors',
        'backgroundservice', 'bluetooth', 'cellbroadcast',
        'downloads', 'device-storage:apps', 'embed-apps', 'idle',
        'mobileconnection', 'network-events', 'networkstats-manage',
        'open-remote-window', 'permissions', 'phonenumberservice', 'power',<commit_msg>bug 1238373 - permission to upload a homescreen<commit_after>"Constants that will be used across files."

import os
import types

# Package type constants.
PACKAGE_ANY = 0
PACKAGE_WEBAPP = 8
PACKAGE_PACKAGED_WEBAPP = 9

JS_DEBUG = False
SPIDERMONKEY_INSTALLATION = os.environ.get("SPIDERMONKEY_INSTALLATION")

DEFAULT_WEBAPP_MRKT_URLS = ["https://marketplace.firefox.com",
                            "https://marketplace-dev.allizom.org"]
BUGZILLA_BUG = "https://bugzilla.mozilla.org/show_bug.cgi?id=%d"

DEFAULT_TIMEOUT = 60

DESCRIPTION_TYPES = types.StringTypes + (list, tuple)

# The maximum size of any string in JS analysis.
MAX_STR_SIZE = 1024 * 24  # 24KB

MAX_RESOURCE_SIZE = 2 * 1024 * 1024

ICON_LIMIT = 10

MAX_GARBAGE = 100 * 1024

# The permission sets are supersets of each other with
# certified > privileged > web. Prerelease permissions are special.
# There is no prerelease app type but privileged (and certified) apps can
# use prerelease permissions before we officially support them.
PERMISSIONS = {
    'web': set([
        'alarms', 'audio-capture', 'audio-channel-content',
        'audio-channel-normal', 'desktop-notification', 'fmradio',
        'geolocation', 'push', 'storage', 'video-capture'
    ]),
    'privileged': set([
        'audio-channel-alarm', 'audio-channel-notification', 'browser',
        'camera', 'contacts', 'device-storage:pictures',
        'device-storage:videos', 'device-storage:music',
        'device-storage:sdcard', 'feature-detection', 'input', 'mobileid',
        'mobilenetwork', 'nfc', 'speaker-control', 'systemXHR', 'tcp-socket',
        'udp-socket', 'homescreen-webapps-manage'
    ]),
    'certified': set([
        'attention', 'audio-channel-ringer', 'audio-channel-telephony',
        'audio-channel-publicnotification', 'background-sensors',
        'backgroundservice', 'bluetooth', 'cellbroadcast',
        'downloads', 'device-storage:apps', 'embed-apps', 'idle',
        'mobileconnection', 'network-events', 'networkstats-manage',
        'open-remote-window', 'permissions', 'phonenumberservice', 'power',
{'fraction_non_alphanumeric': 0.13760350706283486, 'fraction_numerical': 0.016804676083779835, 'mean_word_length': 3.9009546539379474, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, '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': '5905702', 'n_tokens_mistral': 1369, 'n_tokens_neox': 1266, 'n_words': 300}