wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-60
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
import requests as r | |
import json | |
from pprint import pprint | |
# Images | |
dir = 'https://github.com/ultralytics/yolov5/raw/master/data/images/' | |
imgs = [dir + f for f in ('zidane.jpg', 'bus.jpg')] # batched list of images | |
# Send images to endpoint | |
res = r.post("http://localhost:9999/inference", data=json.dumps({'img_list': imgs})) |
First do pip install flask Pillow
in your venv :)
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
# WARNING : This gist in the current form is a collection of command examples. Please exercise caution where mentioned. | |
# Docker | |
sudo apt-get update | |
sudo apt-get remove docker docker-engine docker.io | |
sudo apt install docker.io | |
sudo systemctl start docker | |
sudo systemctl enable docker | |
docker --version |
- Open android studio Tools->Flutter->Clean
- Go to File -> Invalidate Caches / Restart
- Or open terminal run "flutter clean"
- Remove pubspec.lock
- Double check the Flutter SDK Path config correcty - https://tppr.me/qn6dP
Or open the terminal and try this script:
flutter clean
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
#!/usr/bin/env python3 | |
import sys | |
import os | |
import cv2 | |
import gi | |
import signal | |
import threading | |
gi.require_version('Gst', '1.0') | |
from gi.repository import Gst, GObject |
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
#!/bin/bash | |
# Sometimes you want to sleep until a specific time in a bash script. This is useful, for instance | |
# in a docker container that does a single thing at a specific time on a regular interval, but does not want to be bothered | |
# with cron or at. The -d option to date is VERY flexible for relative times. | |
# See | |
# https://www.gnu.org/software/coreutils/manual/html_node/Relative-items-in-date-strings.html#Relative-items-in-date-strings | |
# For details | |
# ALPINE USERS: You will need to install coreutils, as the built-in busybox date does not handle -d correctly. |
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
function mpii_convert_json( ) | |
% convert mpii annotations .mat file to .json | |
%% load annotation file | |
fprintf('Load annotations... ') | |
data = load('/media/HDD2/Datasets/Human_Pose/mpii/mpii_human_pose_v1_u12_2/mpii_human_pose_v1_u12_1.mat'); | |
fprintf('Done.\n') | |
%% open file | |
fprintf('Open file mpii_human_pose_annotations.json\n') |
- To disable a service, download
Disable<Service>.reg
and double-click to import. (Replace<Service>
with the name of the service you want to disable.) - To re-enable a service, download
Enable<Service>.reg
and double-click to import. (Replace<Service>
with the name of the service you want to enable.)
Note that if you save the files by copying them into a text editor, they may need to be saved with Windows-style line endings (\r\n
).
NewerOlder