$ sudo apt install gnat
$ sudo apt install gprbuild
$ gnatmake <filename.adb>
| # Applying a sort feature in a QTableView | |
| import sys | |
| from PyQt5.QtCore import (Qt, | |
| QModelIndex, | |
| QAbstractTableModel, | |
| QSortFilterProxyModel) | |
| from PyQt5.QtWidgets import (QApplication, | |
| QTableView) |
| # Special Character Remover - removes special characters in an alphanumeric text | |
| import string | |
| ALPHANUMERIC = string.digits + string.ascii_letters | |
| text = 'JI000 00-2391M/xxxx---------90234' | |
| # output 'JI000002391Mxxxx90234' | |
| print(''.join([char for char in text if char in ALPHANUMERIC])) |
| <# | |
| A script that will mount a DevDrive. | |
| Usage (run as Administrator) | |
| > ./mount-devdrive.ps1 | |
| #> | |
| # Check if running as admin | |
| if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) |