sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 46B5721DBBD2996A
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 python | |
# -*- coding: UTF-8 -*- | |
import os, sys | |
import json | |
import logging | |
import traceback | |
import psutil | |
import time | |
import preprocess_error |
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
语法为 | |
:[addr]s/源字符串/目的字符串/[option] | |
全局替换命令为: | |
:%s/源字符串/目的字符串/g | |
[addr] 表示检索范围,省略时表示当前行。 | |
“1,20” :表示从第1行到20行; | |
“%” :表示整个文件,同“1,$”; | |
“. ,$” :从当前行到文件尾; | |
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
curl --silent "https://api.github.com/repos/$1/releases/latest" | |
# Usage | |
# $ bash get_latest_release.sh "carla-simulator/carla" |
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
# 切换python的版本 | |
sudo update-alternatives --config python | |
# 配置使用的python各个版本的链接 | |
# python2 | |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 | |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.4 5 | |
# python3 | |
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 5 |
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
# list the size for all files and folders. | |
du -h --max-depth=1 | |
# list all disk and usage. | |
df -lh |
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
$ while read line; do echo $line; done < company.txt |
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
top -H -p [pid] |
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 bash | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
PROJECT_NAME="AgentSim" | |
ENGINE_PATH="${DIR}/../UnrealEngine" | |
PLATFORM_NAME="Linux" | |
SCRIPT_DIR="${ENGINE_PATH}/Engine/Build/BatchFiles" | |
if [ "$(uname)" = "Darwin" ]; then |
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
set DIR=%~dp0 | |
set PROJECT_NAME=AgentSim | |
set PLATFORM_NAME=Win64 | |
set ENGINE_PATH=%DIR%\..\UnrealEngine | |
set RUN_CMD="%ENGINE_PATH%\Engine\Binaries\%PLATFORM_NAME%\UE4Editor.exe" | |
set PROJECT_FILE="%DIR%\%PROJECT_NAME%.uproject" | |
::start "Client" %RUN_CMD% %PROJECT_FILE% ?RosIP=192.168.1.5?RosPort=15000? -game -log -windowed |
OlderNewer