Skip to content

Instantly share code, notes, and snippets.

@vagran
vagran / Arch_linux_NanoPI_A64.md
Last active August 31, 2024 10:09
Booting AArch64 Arch Linux on NanoPI A64

Valid for most recent SW version as of August 2024.

Install packages on Ubuntu 22.04:

apt-get install g++-10-aarch64-linux-gnu device-tree-compiler libgnutls28-dev
export CROSS_COMPILE=aarch64-linux-gnu-

ATF:

@Volatile var i = 0
val lock = AtomicInteger(0)
fun LockSynchronized()
{
synchronized(this) {
i++
}
}
@vagran
vagran / determinant.py
Created March 14, 2018 11:00
Get determinant expression for matrix of arbitrary size.
# Get determinant expression for a matrix.
def Minor(M, rowIdx):
"""
:param M Matrix to get minor for.
:param rowIdx: Row index for minor submatrix. Assuming column 0.
:return: Minor submatrix.
"""
m = []
for i in range(0, len(M)):
@vagran
vagran / determinant.py
Last active March 14, 2018 11:02
Get determinant expression for a 4x4 matrix
# Get determinant expression for a matrix.
# Works for 4x4 matrix only because Rule of Sarrus is used. Can be adapted for any size by using
# recursive algorithm.
M = []
SIZE = 4
def Minor(rowIdx):
"""