viernes, 5 de abril de 2024

APPEND all the txt content of several files *.log in unique fiel output.txt (run in cmd)

 type *.log > output.txt

QUERY amb regex al GoogleSheets

 


Boxplot from data

 <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Boxplot Example</title>
    <!-- Include Plotly.js -->
    <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
</head>
<body>
    <!-- Your HTML content here -->
    <div id="boxplot"></div>

    <script>
        // Data
        const data = [
            [1, 1, 2, 7, 7, 5, 10, 3, 6, 8, 3, 4, 1, 7, 7, 4, 1, 5, 8, 6, 1, 2, 8, 4, 4, 6, 8, 6],
            [2, 2, 3, 5, 3, 7, 2, 4, 6, 2, 2, 2, 2, 3, 4, 4, 1, 3, 5, 2, 3, 5, 3, 3, 8, 8, 3],
            [1, 3, 7, 10, 8, 10, 7, 7, 9, 5, 4, 2, 7, 7, 6, 1, 4, 8, 6, 1, 3, 10, 7, 3, 9, 8, 9],
            [1, 4, 7, 8, 8, 6, 9, 9, 2, 6, 7, 8, 1, 6, 6, 1, 6, 7, 1, 3, 7, 1, 8, 7, 6, 7],
            [2, 3, 6, 8, 6, 9, 6, 6, 8, 3, 4, 2, 5, 5, 6, 6, 0, 4, 8, 6, 2, 3, 8, 4, 6, 7, 7, 6],
            [2, 5, 6, 6, 7, 5, 6, 6, 6, 6, 6, 5, 8, 7, 9, 2, 7, 6, 1, 3, 7, 4, 7, 10, 8, 7],
            [3, 4, 7, 6, 10, 5, 7, 8, 4, 5, 5, 7, 6, 6, 1, 5, 6, 2, 3, 8, 5, 5, 8, 6, 6],
            [3, 5, 7, 6, 9, 7, 7, 7, 5, 6, 4, 6, 5, 7, 1, 2, 7, 1, 4, 7, 4, 6, 8, 7, 6],
            [4, 4, 6, 6, 9, 6, 7, 7, 5, 6, 5, 5, 6, 6, 2, 8, 7, 3, 4, 7, 4, 6, 8, 8, 6],
            [5, 5, 8, 5, 9, 6, 9, 8, 4, 4, 4, 5, 6, 5, 7, 7, 4, 5, 9, 6, 6, 9, 7]
        ];

        // Function to draw boxplot
        function drawBoxPlot(data) {
            const boxplotData = data.map(column => {
                return {
                    y: column,
                    type: 'box',
                };
            });

            const layout = {
                title: 'Boxplot Diagram',
            };

            Plotly.newPlot('boxplot', boxplotData, layout);
        }

        // Call the function with data
        drawBoxPlot(data);

    </script>
</body>
</html>


miércoles, 3 de abril de 2024

append two tables side-by-side

Tenim un grup de dades de tal manera disposades que les files parelles es complementen amb les imparelles. Voldriem una nova taula on cada fila parella sigui seguida de la fila imparella, tot en una única fila en cada cas. 

La fórmula al googlesheets és:

=QUERY({FILTER(Sheet1!A:Y, MOD(ROW(Sheet1!A:A), 2) = 1), FILTER(Sheet1!A:Y, MOD(ROW(Sheet1!A:A), 2) = 0)}, "SELECT *")