<commit_before>
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// This file is part of the frequency-analyzer application.
// It is licensed to you under the terms of the MIT license.
// http://opensource.org/licenses/MIT
//
// Copyright (c) 2014 <NAME>

import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Dialogs 1.1
import hu.timur 1.0

ApplicationWindow {
    visible: true
    width: 790
    height: 500
    title: "Frequency analyzer"

    Row {
        id: topRow
        anchors.top: parent.top
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.topMargin: 10
        spacing: 10

        Button {
            text: "Start"
            enabled: !plot.isStarted
            onClicked: {
                if (!plot.start()) {
                    startError.open();
                }
            }
        }

        Button {
            text: "Stop"
            enabled: plot.isStarted
            onClicked: {
                plot.stop();
            }
        }
    }

    Item {
        anchors.top: topRow.bottom
        anchors.topMargin: 10
        anchors.left: parent.left
        anchors.right: rightPanel.left
        anchors.bottom: parent.bottom

        Waterfall {
            id: plot
            sensitivity: sensitivitySlider.value
            anchors.fill: parent

            Rectangle {
                color: "#88222222"
                radius: 5
                anchors.left: parent.left
                anchors.top: parent.top
                anchors.margins: 10
                width: minFreq.width + 10
                height: minFreq.height + 10

                Text {
                    id: minFreq
                    anchors.centerIn: parent
                    color: "#fff"
                    text: "← " + plot.minFrequency + " Hz"
                }
            }

            Rectangle {
                color: "#88222222"
                radius: 5
                anchors.right: parent.right
                anchors.top: parent.top
                anchors.margins: 10
                width: maxFreq.width + 10
                height: maxFreq.height + 10

                Text {
                    id: maxFreq
                    anchors.centerIn: parent
                    color: "#fff"
                    text: plot.maxFrequency + " Hz →"
                }
            }
        }
    }

    Item {
        id: rightPanel
        anchors.top: topRow.bottom
        anchors.right: parent.right
        anchors.bottom: parent.bottom
        width: 130

        Column {
            anchors.top: parent.top
            anchors.topMargin: 30
            anchors.left: parent.left
            anchors.right: parent.right
            spacing: 10

            Text {
                text: "Sensitivity"
                anchors.horizontalCenter: parent.horizontalCenter
            }
            Slider {
                id: sensitivitySlider
                anchors.horizontalCenter: parent.horizontalCenter
                height: 180
                orientation: Qt.Vertical

                minimumValue: 0.005
                maximumValue: 0.1
                value: 0.05
            }
        }
    }

    Rectangle {
        color: "#66222222"
        height: 1
        anchors.left: parent.left
        anchors.right: parent.right
        anchors.top: topRow.bottom
        anchors.topMargin: 10
    }

    MessageDialog {
        id: startError
        icon: StandardIcon.Critical
        title: "Error with sound card"
        text: "We couldn't start the audio input device. Please verify if audio input is configured correctly on your computer and it supports 44100Hz."
    }

}<commit_msg>added step size to sensitivity slider<commit_after>
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// This file is part of the frequency-analyzer application.
// It is licensed to you under the terms of the MIT license.
// http://opensource.org/licenses/MIT
//
// Copyright (c) 2014 <NAME>

import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Dialogs 1.1
import hu.timur 1.0

ApplicationWindow {
    visible: true
    width: 790
    height: 500
    title: "Frequency analyzer"

    Row {
        id: topRow
        anchors.top: parent.top
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.topMargin: 10
        spacing: 10

        Button {
            text: "Start"
            enabled: !plot.isStarted
            onClicked: {
                if (!plot.start()) {
                    startError.open();
                }
            }
        }

        Button {
            text: "Stop"
            enabled: plot.isStarted
            onClicked: {
                plot.stop();
            }
        }
    }

    Item {
        anchors.top: topRow.bottom
        anchors.topMargin: 10
        anchors.left: parent.left
        anchors.right: rightPanel.left
        anchors.bottom: parent.bottom

        Waterfall {
            id: plot
            sensitivity: sensitivitySlider.value
            anchors.fill: parent

            Rectangle {
                color: "#88222222"
                radius: 5
                anchors.left: parent.left
                anchors.top: parent.top
                anchors.margins: 10
                width: minFreq.width + 10
                height: minFreq.height + 10

                Text {
                    id: minFreq
                    anchors.centerIn: parent
                    color: "#fff"
                    text: "← " + plot.minFrequency + " Hz"
                }
            }

            Rectangle {
                color: "#88222222"
                radius: 5
                anchors.right: parent.right
                anchors.top: parent.top
                anchors.margins: 10
                width: maxFreq.width + 10
                height: maxFreq.height + 10

                Text {
                    id: maxFreq
                    anchors.centerIn: parent
                    color: "#fff"
                    text: plot.maxFrequency + " Hz →"
                }
            }
        }
    }

    Item {
        id: rightPanel
        anchors.top: topRow.bottom
        anchors.right: parent.right
        anchors.bottom: parent.bottom
        width: 130

        Column {
            anchors.top: parent.top
            anchors.topMargin: 30
            anchors.left: parent.left
            anchors.right: parent.right
            spacing: 10

            Text {
                text: "Sensitivity"
                anchors.horizontalCenter: parent.horizontalCenter
            }
            Slider {
                id: sensitivitySlider
                anchors.horizontalCenter: parent.horizontalCenter
                height: 180
                orientation: Qt.Vertical

                minimumValue: 0.005
                maximumValue: 0.1
                stepSize: 0.005
                value: 0.05
            }
        }
    }

    Rectangle {
        color: "#66222222"
        height: 1
        anchors.left: parent.left
        anchors.right: parent.right
        anchors.top: topRow.bottom
        anchors.topMargin: 10
    }

    MessageDialog {
        id: startError
        icon: StandardIcon.Critical
        title: "Error with sound card"
        text: "We couldn't start the audio input device. Please verify if audio input is configured correctly on your computer and it supports 44100Hz."
    }

}
{'fraction_non_alphanumeric': 0.07249879168680522, 'fraction_numerical': 0.02199130014499758, 'mean_word_length': 1.3191370131689548, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4859292', 'n_tokens_mistral': 2351, 'n_tokens_neox': 2066, 'n_words': 633}