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
sudo apt purge ffmpeg | |
sudo apt purge libavcodec-dev libavformat-dev libswscale-dev | |
sudo apt autoremove --purge | |
sudo apt install build-essential cmake git unzip wget locate | |
sudo apt-get install yasm libnuma1 libnuma-dev | |
git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git | |
cd nv-codec-headers && sudo make install && cd - |
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 | |
set -e | |
sudo apt install build-essential git libgtk2.0-dev pkg-config | |
sudo apt install libavcodec-dev libavformat-dev libswscale-dev libgoogle-glog-dev | |
sudo apt install cmake | |
ROOT_PATH=$(pwd) | |
ENABLE_PARALELLE=ON |
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 | |
set -e | |
if ! command -v code &> /dev/null | |
then | |
echo "Please install vscode manually." | |
exit | |
fi | |
sudo apt update |
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 | |
set -e | |
sudo apt install -y libpython3-dev python3-pip | |
sudo pip3 install numpy | |
sudo apt purge libboost* | |
sudo apt autoremove --purge |
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 | |
set -e | |
if [[ $# -lt 3 ]]; then | |
echo "Usage: "$0" <PROXY_PORT> <PROXY_PSWD>" | |
exit 0 | |
fi | |
apt update |
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
if [[ $# -lt 4 ]]; then | |
echo "Usage: "$0" <SERVER_IP> <SERVER_PORT> <PROXY_PSWD> <LOCAL_PORT>" | |
exit 0 | |
fi | |
sudo apt-get -y install --no-install-recommends git gettext build-essential \ | |
autoconf libtool libpcre3-dev asciidoc xmlto libev-dev libc-ares-dev \ | |
automake libmbedtls-dev libsodium-dev libssl-dev autoconf libtool pkg-config | |
rm -rf shadowsocks-libev |
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 | |
set -e | |
sudo apt update -qq | |
sudo apt install -yq software-properties-common | |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
sudo apt update -qq | |
sudo apt install -yq gcc-7 g++-7 | |
sudo update-alternatives \ | |
--install /usr/bin/gcc gcc /usr/bin/gcc-7 60 \ | |
--slave /usr/bin/g++ g++ /usr/bin/g++-7 \ |
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
#include <execinfo.h> | |
void print_trace (void) { | |
void *ppArrays[256]; | |
int nTraceNum = backtrace(ppArrays, sizeof(ppArrays) / sizeof(ppArrays[0])); | |
char **ppSymbols = backtrace_symbols(ppArrays, nTraceNum); | |
if (ppSymbols != NULL) { | |
printf("Obtained %d stack frames.\n", nTraceNum); | |
for (int i = 0; i < nTraceNum; i++) { | |
printf("%s\n", ppSymbols[i]); | |
} |
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 sys, io, os.path as path, functools as ft # basic packages | |
import urllib.request as url_req, numpy as np, cv2 # extension packages | |
import torch, torch.nn as nn, torchvision.ops as ops # pytorch packages | |
data_path = '.' if len(sys.argv) < 2 else sys.argv[1] | |
image_file_url = 'https://github.com/pjreddie/darknet/raw/master/data/dog.jpg' | |
image_filename = path.join(data_path, 'dog.jpg') | |
weight_file_url = 'https://pjreddie.com/media/files/yolov3.weights' | |
weight_filename = path.join(data_path, 'yolov3.weights') |
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
# conceptions: static images, running containers | |
docker image ls # list all images | |
docker image rm IMAGE_NAME # remove image | |
docker run -t -i -d --rm --env=DISPLAY=$DISPLAY --net=host IMAGE_NAME /bin/bash # run a image | |
docker exec -it CONTAINER_NAME /bin/bash # enter a container | |
docker kill CONTAINER_NAME # kill a running container | |
docker rm CONTAINER_NAME # remove a container | |
docker ps # list all containers |
OlderNewer