This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using LinearAlgebra | |
# Wikipedia non-preserving version (transcribed from VB) | |
# https://en.wikipedia.org/wiki/Tridiagonal_matrix_algorithm | |
# this one is wrong (found this in use in the wild 😢) | |
function thomas_algorithm!(a, b, c, r, ::Val{1}) | |
n = length(b) | |
for i in 2:(n-1) | |
m = a[i]/b[i-1]; | |
b[i] = b[i] - m * c[i - 1]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put this in your startup.jl | |
using InteractiveUtils | |
let | |
tmuxsession = nothing | |
sessions = split(String(read(`tmux list-panes -a -F '#{pane_tty} #{session_name}'`)), '\n') | |
io = IOBuffer() | |
run(pipeline(`tty`, stdout=io)) | |
tty = chomp(String(take!(io))) | |
for session in sessions | |
if occursin(tty, session) |