Remove any existing nvidia packages. (Note: Run this in bash, as the wildcard input to apt-get doesn't work in zsh)
sudo apt-get purge nvidia*
Update package listing and upgrade packages.
sudo apt update
Remove any existing nvidia packages. (Note: Run this in bash, as the wildcard input to apt-get doesn't work in zsh)
sudo apt-get purge nvidia*
Update package listing and upgrade packages.
sudo apt update
Nvidia drivers don't yet support linux kernel 5.9.* and a power outage in my house caused my server running Debian Testing (Bullseye) to reboot and upgrade to the latest kernel. The prices I pay for up-to-date software . . .
To use my Nvidia card I have to downgrade to the 5.8.0 kernel. I use the simple and reliable solution below. You need to be able to plug a display and keyboard into your machine though for the last part.
/etc/default/grub
. This tells GRUB to save whatever setting you change on the GRUB screen during boot.GRUB_SAVEDEFAULT=true
GRUB_DEFAULT=saved
#!/usr/bin/env python3 | |
"""Asynchronously download a list of links.""" | |
from typing import Iterable | |
import asyncio | |
import logging | |
import pathlib | |
import sys | |
import aiofiles |
#!/bin/bash | |
# Installs the nightly NeoVim app image to /opt and symlink to /usr/local/bin | |
# This is the easiest way to install NeoVim nightly on a distro that doesn't package it. | |
# Should be run as root | |
if [ "${EUID:-$(id -u)}" -ne 0 ]; then | |
echo Please run as root. | |
exit 1 | |
fi |
upstream nb { | |
server 10.19.0.10:1234; | |
} | |
server { | |
server_name example.com; | |
location / { | |
proxy_pass http://nb; | |
proxy_set_header Host $host; |
import asyncio | |
import subprocess | |
from fastapi import FastAPI, WebSocket | |
from fastapi.responses import HTMLResponse | |
def nvidia_smi(): | |
try: | |
msg = subprocess.run( |
Set-PSReadlineOption -EditMode Emacs | |
Set-Alias vim nvim | |
Set-Alias python3 python | |
# Some unix shell hacks | |
Function which([string]$Name) { Get-Command $Name } | |
Function open($Name) { start $name } | |
Function l() {ls -Force} | |
# Git shortcuts from zsh git plugin |
import numpy as np | |
import cv2 | |
def polar2cart(img: np.ndarray): | |
""" | |
Convert image (B-scan) from Polar coordinates to Cartesian coordinates | |
""" | |
# Resize image to square first |
""" | |
B. S. Reddy and B. N. Chatterji, “An FFT-based technique for translation, rotation, and scale-invariant image registration,” IEEE Transactions on Image Processing, vol. 5, no. 8, pp. 1266–1271, Aug. 1996, doi: 10.1109/83.506761. | |
Implemented in Numpy/OpenCV and Numpy/Scikit-Image | |
The OpenCV version is about 4 times faster than the Scikit-Image version. | |
""" | |
# Numpy/OpenCV implementation | |
import cv2 | |
from scipy import signal |