Based on here
gpg --armor --export > pub.asc
gpg --armor --export-secret-keys > priv.asc
gpg --armor --export-ownertrust > trust.ascBased 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=''): |
| #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) | |
| #!/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!). |
| ####################################################################### | |
| ## Sets phone as audio source for laptop speakers through bluetooth ## | |
| ####################################################################### | |
| # check bluetooth | |
| rfkill list | |
| # if bluetooth blocked, run | |
| rfkill unblock bluetooth |
| """Benchmarks for the video reader: OpenCV vs Torchvision. | |
| OpenCV is faster than Torchvision when just reading the frames, but it's slower when | |
| adding the conversions to RGB, tensor, float, and stacking the frames. | |
| Results: | |
| Benchmarking OpenCV | |
| Read 300 frames in 0.84 seconds | |
| Read 300 frames in 0.81 seconds | |
| Read 300 frames in 0.98 seconds |
| #!/usr/bin/env bash | |
| # Helper program to list useful CRC commands | |
| function get_pager_cmd() { | |
| if command -v bat &>/dev/null; then | |
| echo "bat -l bash" | |
| else | |
| echo cat | |
| fi | |
| } |
| #!/bin/env bash | |
| # Script to automate VPN client start and entering credentials | |
| # "xdotool key" and "xdotool type" commands were not working | |
| # most of times when using the --window option, so the script | |
| # uses the "wmctrl" to switch window focus before typing or | |
| # pressing keys. | |
| # === BEFORE FIRST EXECUTION === | |
| # Set VPN_USERNAME below; | |
| # Store the VPN password once with secret-tool: | |
| # secret-tool store --label "Cisco VPN credentials" vpn_client "$VPN_USERNAME" |