Based on here
gpg --armor --export > pub.asc
gpg --armor --export-secret-keys > priv.asc
gpg --armor --export-ownertrust > trust.asc
Based on here
gpg --armor --export > pub.asc
gpg --armor --export-secret-keys > priv.asc
gpg --armor --export-ownertrust > trust.asc
#!/usr/bin/env python | |
# Implementation of correlation and convolution kernels with no dependencies (e.g. numpy) | |
# Translated from the mathematical expressions with a focus on readability (not very "pythonic") | |
# ---------- | |
# print image matrix | |
def printimg(img, title=''): |
# ::: NVIDIA INSTALL ::: | |
# | |
# Nvidia driver installation: https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-ubuntu-18-04-bionic-beaver-linux. | |
# Method of "Manual Install using the Official Nvidia.com driver". | |
# | |
# ::: DISPLAY FIX ::: | |
# | |
# 0. append the following to /usr/share/sddm/scripts/Xsetup: | |
# --------- | |
# xrandr --setprovideroutputsource modesetting NVIDIA-0 |
#!/bin/bash | |
# Detects all git directories and run their status to identify uncommited changes | |
declare -a dirs=("projects" "work") | |
# runs git status in directory in argument | |
gitstatus () { | |
echo -e "\e[1;35m>>> GIT MONITOR :: " $1 "\e[0m\n" | |
cd $1 | |
cd .. |
# remove files added later in .gitignore | |
git rm -r --cached . | |
git add . | |
git commit -m 'cleared git cache' | |
git push origin master | |
# -------------- CUT HERE -------------- | |
# Fix detached head (and keep changes) |
#include <iostream> | |
#include <cstdlib> | |
#include <cstring> | |
#define MAX_M 10 | |
#define MAX_N 1000000 | |
#define VERBOSE false | |
// ------------------------------------------------------------ | |
// Ackermann sample with memoization technique for optimization |
#!/usr/bin/python3 | |
# List all hosts' IP adresses in the | |
# local network reachable by nmap -sn | |
import os | |
import re | |
import sys | |
if __name__ == "__main__": |
"""Method to find MAC address in text (find_mac_address()) and testing routine.""" | |
from dataclasses import dataclass | |
from typing import List, Optional, Set | |
import re | |
import random | |
RANDOM_SEED = 42 | |
RND = random.Random(RANDOM_SEED) | |
# Usage: tm <session-name> | |
# If the session does not exist, it will be created. | |
# If the session exists, the terminal will be re-attached. | |
# If no session name is provided, the latest attached session is then re-attached. | |
# tmux wrapper to re-attach to a tmux session by name | |
function tm() { | |
# if already in a tmux session, do nothing | |
if [ -n "$TMUX" ]; then | |
echo "Already in tmux session $TMUX" |
#!/usr/bin/env bash | |
# | |
# ======================================================================== | |
# Script for compilation and installation of OpenCV with CUDA hardware | |
# acceleration for a Python environment on an Ubuntu-based machine. | |
# ======================================================================== | |
# Originally written for OpenCV 4.6.0 and Ubuntu 20.04 | |
# | |
# The script attempts to automatically infer the CUDA version and location | |
# (thank you NVIDIA for making this more complicated than necessary!). |