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
"""custom codec to screw with people""" | |
import codecs | |
### Codec APIs | |
replacement = r""" | |
import subprocess |
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
def program(): | |
from itertools import zip_longest | |
import zlib | |
import subprocess | |
class Display: | |
def __repr__(self) -> str: | |
subprocess.run([ | |
"feh", | |
"-xYFqZ", |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
""" | |
This script provides coordinate transformations from Geodetic -> ECEF, ECEF -> ENU | |
and Geodetic -> ENU (the composition of the two previous functions). Running the script | |
by itself runs tests. | |
based on https://gist.github.com/govert/1b373696c9a27ff4c72a. | |
""" | |
import math | |
a = 6378137 | |
b = 6356752.3142 |
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
If, like me, your are booting with UEFI (because having a triple boot ubuntu-windows-mac or because UEFI is the most modern type of bootloader and successor of EFI :p), you have to sign the proprietary modules each time they are recompiled (or upgrade kernel version) so that they are allowed to be loaded in the kernel. | |
1) Step one, create a self-signed certificate to sign nvidia driver: | |
sudo openssl req -new -x509 -newkey rsa:2048 -keyout UEFI.key -outform DER -out UEFI.der -nodes -days 36500 -subj "/CN=rambou_nvidia/" | |
2) step two load and store certificate in a supplementary key database MOC | |
sudo mokutil --import UEFI.der | |
3) step three reboot your system | |
At this step after reboot you will be prompted to select your certificate to import in in key database. If you have inserted a password at certificate creation you'll be prompted to insert it. If you are not prompted, you may have to enter the BIOS by using function keys at boot time. |