Beispiel #1
0
class DuplicateRestriction(dbsettings.Group):
    max_duplicates = dbsettings.PositiveIntegerValue(help_text = "The maximum number of duplicate comments allowed during a given time period.",
                                                     default = 0)
    window_hours = dbsettings.PositiveIntegerValue(help_text = "The historic period (in hours) checked for duplicate comments.",
                                                   default = 24)
    duplicate_lockout_minutes = dbsettings.PositiveIntegerValue(help_text = "How long (in minutes) the ip address will be locked out if it violates this restriction.",
                                                      default = 1)
    duplicate_lockout_reason = dbsettings.StringValue(help_text = "Message sent with error indicating why lockout occurred.",
                                            default = "Duplicate comment")
Beispiel #2
0
class FrequencyRestriction(dbsettings.Group):
    max_postings = dbsettings.PositiveIntegerValue(help_text = "The maximum number of comments allowed during a given time period.",
                                                     default = 2)
    window_minutes = dbsettings.PositiveIntegerValue(help_text = "The historic period (in minutes) used for counting the number of comments posted by a given ip address.",
                                                   default = 1)
    frequency_lockout_minutes = dbsettings.PositiveIntegerValue(help_text = "How long (in minutes) the ip address will be locked out if it violates this restriction.",
                                                      default = 5)
    frequency_lockout_reason = dbsettings.StringValue(help_text = "Message sent with error indicating why lockout occurred.",
                                            default = "Too many comments posted")
Beispiel #3
0
class SiteSettings(dbsettings.Group):
    enabled = dbsettings.BooleanValue('Send email after purchase', default=False)
    sender = dbsettings.StringValue('address to send emails from')
    subject = dbsettings.StringValue()  
    products_per_page = dbsettings.PositiveIntegerValue(
                        'Number of products to be displayed on a page',
                        default=20) 
    remove_cart = dbsettings.PositiveIntegerValue(
                        'Remove cart after how many days of inactivity',
                        default=1)
    
    
Beispiel #4
0
class PeopleDetectorAlgorithmSettingGroup(dbsettings.Group):

    implementation = dbsettings.StringValue(
        description='People image tracking algorithm implementation',
        required=False,
        default='hog',
        choices=PEOPLE_DETECTOR_IMPL_CHOICES)

    rect_line_width = dbsettings.PositiveIntegerValue(
        description='People tracking rectangle line width (px)',
        required=True,
        default=2)

    rect_line_color = RGBValue(
        description='People tracking rectangle color (RGB)',
        required=True,
        default=['0', '0', '255'],
        separator=',')

    output_enhanced_image = dbsettings.BooleanValue(
        description='Save image enhanced with people tracking data',
        required=True,
        default=True)

    image_output_path = dbsettings.StringValue(
        help_text='Output path for image enhanced with people tracking data',
        required=True,
        default='/tmp/scamera/people_tracking/')
Beispiel #5
0
class HOGPeopleDetectorSettingGroup(dbsettings.Group):
    image_max_width_size = dbsettings.PositiveIntegerValue(
        help_text=
        'Image maximum width (reduces detection time and improves overall accuracy)',
        required=True,
        default=400)

    win_stride_x = dbsettings.PositiveIntegerValue(
        help_text='“step size” in X of the sliding window',
        required=True,
        default=4)
    win_stride_y = dbsettings.PositiveIntegerValue(
        help_text='“step size” in Y of the sliding window',
        required=True,
        default=4)

    scale = dbsettings.FloatValue(
        help_text=
        "controls the factor in which our image is resized at each layer of the image pyramid",
        required=True,
        default=1.05,
    )

    padding_x = dbsettings.PositiveIntegerValue(
        help_text=
        'the number of pixels in X direction in which the sliding window ROI is “padded” prior to HOG feature extraction',
        required=True,
        default=4)
    padding_y = dbsettings.PositiveIntegerValue(
        help_text=
        'the number of pixels in Y direction in which the sliding window ROI is “padded” prior to HOG feature extraction',
        required=True,
        default=4)

    non_maxima_suppression_thresh = dbsettings.FloatValue(
        description='Non maxima suppression threshold',
        help_text=
        'suppress bounding boxes that overlap with a specified threshold',
        required=True,
        default=0.65)
Beispiel #6
0
class ParserSettings(dbsettings.Group):
    WORKER_POOL_SIZE = dbsettings.PositiveIntegerValue(default=20)
    REQUEST_MAX_TIMEOUT = dbsettings.PositiveIntegerValue(default=5)
    REQUEST_MIN_DELAY = dbsettings.FloatValue(default=0.1)
Beispiel #7
0
class MLOptions(dbsettings.Group):
    """DB settings for the machine learning"""
    enable = dbsettings.BooleanValue(
        'automatically resolve response tasks by machine learning')
    confidence_min = dbsettings.PositiveIntegerValue(
        'minimum percent confidence level to automatically resolve')
Beispiel #8
0
class APISettings(dbsettings.Group):
    URLS_UPLOAD_MAX_SIZE = dbsettings.PositiveIntegerValue(default=1024 * 7)
    SEARCH_PAGE_LIMIT = dbsettings.PositiveIntegerValue(default=10)