<commit_before># -*- coding: utf-8 -*-
import logging
import os
import re
import subprocess
import tempfile
import time
from fractions import Fraction
from itertools import chain

import usb
from jpegtran import JPEGImage
from spreads.vendor.pathlib import Path

from spreads.config import OptionTemplate
from spreads.plugin import DevicePlugin, DeviceFeatures
from spreads.util import DeviceException


WHITEBALANCE_MODES={ 'Auto':0, 'Daylight':1, 'Cloudy':2, 'Tungsten':3, 'Fluorescent':4, 
           'Fluorescent H':5, 'Custom':7 }

class CHDKPTPException(Exception):
    pass


class CHDKCameraDevice(DevicePlugin):
    """ Plugin for digital cameras running the CHDK firmware.

    """
    features = (DeviceFeatures.PREVIEW, DeviceFeatures.IS_CAMERA)

    target_page = None
    _cli_flags = None
    _chdk_buildnum = None
    _can_remote = False
    _zoom_steps = 0

    MAX_RESOLUTION = 0
    MAX_QUALITY = 0

    @classmethod
    def configuration_template(cls):
        conf = super(CHDKCameraDevice, cls).configuration_template()
        conf.update(
            {'sensitivity': OptionTemplate(80, "The ISO sensitivity value"),<commit_msg>WHITEBALANCE_MODES: Spaces after the colon.<commit_after># -*- coding: utf-8 -*-
import logging
import os
import re
import subprocess
import tempfile
import time
from fractions import Fraction
from itertools import chain

import usb
from jpegtran import JPEGImage
from spreads.vendor.pathlib import Path

from spreads.config import OptionTemplate
from spreads.plugin import DevicePlugin, DeviceFeatures
from spreads.util import DeviceException


WHITEBALANCE_MODES={ 'Auto': 0, 'Daylight': 1, 'Cloudy': 2, 'Tungsten': 3,
           'Fluorescent': 4, 'Fluorescent H': 5, 'Custom': 7 }

class CHDKPTPException(Exception):
    pass


class CHDKCameraDevice(DevicePlugin):
    """ Plugin for digital cameras running the CHDK firmware.

    """
    features = (DeviceFeatures.PREVIEW, DeviceFeatures.IS_CAMERA)

    target_page = None
    _cli_flags = None
    _chdk_buildnum = None
    _can_remote = False
    _zoom_steps = 0

    MAX_RESOLUTION = 0
    MAX_QUALITY = 0

    @classmethod
    def configuration_template(cls):
        conf = super(CHDKCameraDevice, cls).configuration_template()
        conf.update(
            {'sensitivity': OptionTemplate(80, "The ISO sensitivity value"),
{'fraction_non_alphanumeric': 0.08383233532934131, 'fraction_numerical': 0.011120615911035072, 'mean_word_length': 3.976595744680851, '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': '3491255', 'n_tokens_mistral': 734, 'n_tokens_neox': 670, 'n_words': 206}