• What a pain

    01/07/2022 at 14:41 0 comments

    VBA Excel Script

    Private Sub CommandButton1_Click()
        Module1.createLetters
    End Sub
    
    # Module1 ###############################################################
    
    Dim LColumns(16383) As String
    
    ----------------------------------------------------------------------------------------------------------------------------------
    
    Sub createLetters()
    
            Module1.setColumns
    
            Sheets.Add.Name = "Letters"
            For x = 0 To 16383
                Sheets("Letters").Cells(1, x + 1).Value = LColumns(x)
                Sheets("Letters").Cells(2, x + 1).Value = x
            Next x
            ActiveWorkbook.Save
    
    End Sub
    
    ---------------------------------------------------------------------------------------------------------------------------------------------------
    
    Sub setColumns()
        Dim col_count As Integer
        Dim letters As Variant
        Dim ColumnL As String
        
        letters = Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")
        col_count = 0
        While col_count < 16384
            If col_count < 26 Then
                ColumnL = letters(col_count Mod 26)
            ElseIf (col_count >= 26) And (col_count < ((26 * 26) + 26)) Then
                ColumnL = letters(Int((col_count / 26) - 1) Mod 26) & letters(col_count Mod 26)
            Else
                If Int((col_count / 26) - 1) Mod 26 < 25 Then
                    ColumnL = letters(Int((col_count / 26 / 26) - 1)) & letters(Int((col_count / 26) - 1) Mod 26) & letters(col_count Mod 26)
                Else
                    ColumnL = letters(Int((col_count / 26 / 26) - 2)) & letters(Int((col_count / 26) - 1) Mod 26) & letters(col_count Mod 26)
                End If
            End If
            LColumns(col_count) = ColumnL
            col_count = col_count + 1
        Wend
    End Sub

    Python

    letters = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
    col_count = 0
    columns = []
    while col_count < 16384:
        if col_count < 26:
            column = letters[col_count%26]
        elif col_count >= 26 and col_count < (26*26) + 26:
            column = letters[(int(col_count/26)-1)%26] + letters[col_count%26]
        else:
            if int(col_count/26)-1)%26 < 25:
                column = letters[(int(col_count/26/26)-1)%26] +  letters[(int(col_count/26)-1)%26] + letters[col_count%26]
            else:
                 column = letters[(int(col_count/26/26)-2)%26] +  letters[(int(col_count/26)-1)%26] + letters[col_count%26]
        col_count += 1
        columns.append(column)

  • Light up Octopus

    03/21/2021 at 16:00 0 comments

  • tensorflow - cudnn

    03/04/2020 at 17:25 0 comments

    Jetpack 42 - CuDNN 7.5.0

    Jetpack 43 - CuDNN 7.6.3

    https://developer.download.nvidia.com/compute/redist/jp/