https://ubuntu.com/core/docs/networkmanager/configure-wifi-access-points
nmcli d wifi hotspot ifname <interface> ssid <ssid> password <password>
Example:
#include <iostream> | |
#include <fstream> | |
#include <vector> | |
#include <cstdint> | |
class BinaryVectorStream { | |
private: | |
std::vector<uint8_t>& data; | |
size_t position; |
# From https://docs.ultralytics.com/fr/integrations/tensorrt/#installation | |
from ultralytics import YOLO | |
import os | |
import cv2 | |
# Export the model to TensorRT format, this will take a long time but should be done only once (per GPU) | |
if not os.path.isfile('yolov8n.engine'): | |
# Load the YOLOv8 model | |
model = YOLO('yolov8n.pt') | |
import cv2 | |
import numpy as np | |
calib_fx=615 | |
calib_baseline=10 | |
def depth_to_disp(depth_filename, disp_filename): | |
cv_file = cv2.FileStorage(depth_filename, cv2.FILE_STORAGE_READ) | |
matrix = cv_file.getNode("depth").mat() | |
cv_file.release() |
# https://github.com/microsoft/mimalloc | |
VERSION="1.8.2" | |
wget https://github.com/microsoft/mimalloc/archive/refs/tags/v${VERSION}.zip | |
unzip v${VERSION}.zip | |
cd mimalloc-${VERSION} | |
mkdir build ; cd build ; cmake .. ; make -j ; sudo make install | |
cd ../../ | |
rm -rf v${VERSION}.zip mimalloc-${VERSION} | |
sudo ln -s /usr/local/lib/libmimalloc.so /usr/lib/libmimalloc.so |
import os | |
import shutil | |
from concurrent.futures import ThreadPoolExecutor | |
def remove_file(file_path): | |
try: | |
os.remove(file_path) | |
print(f"File '{file_path}' removed successfully.") | |
except Exception as e: | |
print(f"Failed to remove file '{file_path}': {e}") |
https://ubuntu.com/core/docs/networkmanager/configure-wifi-access-points
nmcli d wifi hotspot ifname <interface> ssid <ssid> password <password>
Example:
#!/bin/bash | |
host=$(cat /etc/hostname) | |
echo "PC Name: ${host}" | |
cpu=$(cat /proc/cpuinfo | grep "model name" | head -1 | sed "s/model name : //") | |
echo "CPU: ${cpu}" | |
motherboard=$(sudo dmidecode -t 2 | grep "Product Name" | sed "s/ Product Name: //") | |
echo "Motherboard: ${motherboard}" |
#!/usr/bin/env bash | |
set -x | |
LT4_MAJOR=32 | |
LT4_MINOR_OLD=6 | |
LT4_MINOR=7 | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" |
targets=( | |
192.168.1.83 # sl-u18-hlc1 | |
192.168.2.253 # sl-nano-run5-46 | |
192.168.3.220 # sl-tx2nx-run1-jp46 | |
192.168.2.246 # sl-nx-run1-jp46 | |
192.168.3.73 # sl-run-multicam | |
) | |
# all targets have the same user and password, this can be skipped if the ssh key is already registered | |
user="<user>" | |
pass="<password>" # security issue |
#docker run --gpus=all -it -v /:/host/ nvcr.io/nvidia/pytorch:22.02-py3 | |
host_folder="/host/tmp/yolov7_results.txt" | |
rm ${host_folder} | |
git clone https://github.com/WongKinYiu/yolov7 | |
cd yolov7 | |
pip install -qr requirements.txt | |
pip uninstall opencv-python | |
pip install opencv-python-headless==4.4.0.40 |