An introduce to xlsxwriter :)

xlsxwriter is an xlsx auto generate with charts in python

Today i will show how to generate the xlsx and send to reporter!

I am a maintainer and the server status must be reported to my boss every weekend . They prefer xlsx file and charts in the file.

So , i have to generate the xlsx with chart includ the summary of server status data .

finally , i will send it via my yandex mail to my boss.:)


An interesting problem for Spiral matrix!

few days ago . my friend go to have an interview.he saw this meaningful algorithm . like leetcode spiral matrix.

here is my code,in my code,i predefine the matrix is 17*17 🙂

    int arr[17][17];
    int m=17;
    int n=17;
    int i = 0;
    int j = 0;
    int count = 1;
    int the_max = 0;
    int max = m*n;
    // initial to 0
    for (int j = 0; j < n; j++)
        for (int i = 0; i < m; i++)
            arr[i][j] = 0;
    // construct the matrix
    for (; count <= max; )
        i = the_max;
        j = the_max;
        // top row
            arr[i][j] = count++;
        // right column
            arr[i][j] = count++;
        // bottom row
            arr[i][j] = count++;
        // left column
            arr[i][j] = count++;

something detail must to be caucion .the odd parameter should have a special process.
since the last row,the first 12 rows cannot print the last row.for example 17*17 , 656,666 wil not show instead of 0.
so i hope i will fix it will the code in the future 🙂

i think this problem also have other more powerful solutions!