kubernetes-cli (v1.10.3) taken as example
- Downgrade Homebrew to the commit which upgrades the formula to the specific version that we want
$ cd "$(brew --repo homebrew/core)"
$ git log Formula/kubernetes-cli.rb
...
| sudo nano /etc/modprobe.d/nvidia.conf | |
| blacklist nvidiafb | |
| blacklist nouveau | |
| ================================== | |
| sudo update-initramfs -c -d -u | |
| ================================== |
| echo "software by https://github.com/utkuozdemir/nvidia_gpu_exporter" | |
| wget https://github.com/utkuozdemir/nvidia_gpu_exporter/releases/download/v1.2.1/nvidia-gpu-exporter_1.2.1_linux_amd64.deb | |
| dpkg -i nvidia-gpu-exporter_1.2.1_linux_amd64.deb | |
| wget https://github.com/prometheus/node_exporter/releases/download/v1.8.2/node_exporter-1.8.2.linux-amd64.tar.gz | |
| tar xvfz node_exporter-*.*-amd64.tar.gz | |
| cd node_exporter-*.*-amd64 | |
| mv node_exporter /usr/local/bin/ | |
| useradd -rs /bin/false node_exporter | |
| echo "Creating systemd service file..." | |
| cat <<EOF | tee /etc/systemd/system/node_exporter.service > /dev/null | |
| [Unit] |
| systemctl stop pve-cluster corosync | |
| pmxcfs -l | |
| rm /etc/corosync/* | |
| rm /etc/pve/corosync.conf | |
| killall pmxcfs | |
| systemctl start pve-cluster |
| cat /etc/modprobe.d/nvidia.conf | |
| blacklist nvidiafb | |
| blacklist nouveau | |
| ================================== | |
| update-initramfs -c -d -u | |
| ================================== | |
| dmesg | grep -i iommu | |
| dmesg | grep -e DMAR -e IOMMU |
| import socket | |
| import time | |
| server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) | |
| server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) | |
| # Enable broadcasting mode | |
| server.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) | |
| server.settimeout(0.2) |
| import cv2 | |
| import numpy as np | |
| from datetime import datetime | |
| # datetime object containing current date and time | |
| now = datetime.now() | |
| dt_string = now.strftime("%d-%m-%Y_%H_%M_%S") | |
| print("date and time =", dt_string) |
| class ThreadedCamera(object): | |
| def __init__(self, src=0): | |
| self.capture = cv2.VideoCapture(src) | |
| self.capture.set(cv2.CAP_PROP_BUFFERSIZE, 2) | |
| # FPS = 1/X | |
| # X = desired FPS | |
| self.FPS = 1/30 | |
| self.FPS_MS = int(self.FPS * 1000) |
| #!/bin/bash | |
| ## This gist contains instructions about cuda v11.2 and cudnn 8.1 installation in Ubuntu 18.04 for PyTorch | |
| ############################################################################################# | |
| ##### forked by : https://gist.github.com/Mahedi-61/2a2f1579d4271717d421065168ce6a73 ######## | |
| ############################################################################################# | |
| ### steps #### | |
| # verify the system has a cuda-capable gpu |