df -hl
du -h --max-depth=1
tar -zcvf dirname.tar.gz dirname1 dirname1
tar -zcvf dirname.zip dirname
andtar zxvf dirname.zip
tar -zcvf dirname.zip dirname
andtar zxvf dirname.tar.gz
pip install -U scikit-learn
python -m pip show scikit-learn # to see which version and where scikit-learn is installed
python -m pip freeze # to see all packages installed in the active virtualenv
python -c "import sklearn; sklearn.show_versions()"
orconda install scikit-learn
conda list scikit-learn
conda list
python -c "import sklearn; sklearn.show_versions()"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- run
chsh-s/bin/zsh
to change default Shell. - then reboot.
git config --global user.name "qihao-huang"
git config --global user.email "[email protected]"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
# CN
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
sudo chown -R $(whoami) /usr/local/share/doc /usr/local/share/man /usr/local/share/man/man1
chmod u+w /usr/local/share/doc /usr/local/share/man /usr/local/share/man/man1
brew install node
curl -sLf https://spacevim.org/install.sh | bash
- Check my configs
echo ${PATH}
# add new variables in bashrc/bash_profile
echo 'alias cc-v="conda activate cc-v"' >> ~/.zshrc
echo 'export PATH="/Users/quiescence/anaconda3/bin:$PATH"' >> ~/.zshrc
source ~/.zhsrc
# or
rezsh
ssh-keygen -t rsa -C "[email protected]"
- then run
pbcopy < ~/.ssh/id_rsa.pub
in mac orcat ~/.ssh/id_rsa.pub | xsel
in ubuntu, - and copy it into Github settings.
- vs code ssh remote config
- VS Code
- openJDK
brew tap AdoptOpenJDK/openjdk; brew cask install adoptopenjdk11
- test with
java -version
andjavac -version
.
- mac java version
echo $(/usr/libexec/java_home)
export JAVA_HOME=$(/usr/libexec/java_home)
in~/.bash_profile
- e.g.
echo 'export JAVA_HOME=$(/usr/libexec/java_home)' >> ~/.zshrc
- e.g.
- Version: 3.3.1 embedded in ROS Kinetic (recommend)
or
pip install opencv-python==3.3.1
- download and extract
*.tar.bz2
- run
*/bin/python3.5m
for python API. - set blender Python API if needed.
sudo apt install meshlab
.
-
CPU version
sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl sudo apt-get update sudo apt-get install libpcl-dev
param:
libpcl-dev
for 16.04 or laterlibpcl-all
for 14.04
-
For GPU version, compile from source.
- download
anaconda.sh
from anaconda - follow
shell/.bash_profile
conda create -n qihao-dev python=3.7
-
follow
scripts/GPU_install.sh
-
PyTorch 1.4 with CUDA 9.0/10.0: install PyTorch using conda, DONT install it using system's python.
conda install pytorch torchvision -c pytorch # anaconda's conda # or pip install torch torchvision # anaconda's pip
-
test with:
import torch print(torch.__version__) # Version print(torch.cuda.is_available()) # GPU is available print(torch.cuda.device_count()) print(torch.cuda.get_device_name(0)) print(torch.cuda.current_device())
-
test multi-GPU:
https://github.com/qihao-huang/tensorflow-mgpu-cifar10.git cd pytorch-mgpu-cifar10 export CUDA_VISIBLE_DEVICES=0,1 # parallel training with GPUs 0 and 1. nohup python train_cifar10.py > log.txt & watch -n 0.5 nvidia-smi # Tensorflow import tensorflow.compat.v1 as tf tf.disable_v2_behavior() # import tensorflow as tf print(tf.__version__) # https://www.tensorflow.org/install/source#gpu # export CUDA_VISIBLE_DEVICES=2 # conda activate tf-1-14 # export PATH=/usr/local/cuda-10.1/bin:$PATH # export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64:$LD_LIBRARY_PATH # export LIBRARY_PATH=/usr/local/cuda-10.1/lib64:$LIBRARY_PATH # nvcc --vesion os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" os.environ["CUDA_VISIBLE_DEVICES"] = "2" from tensorflow.python.client import device_lib print(device_lib.list_local_devices()) tf.test.is_gpu_available() tf.test.gpu_device_name()
-
tmux: tutorial
tmux new -s session_name nvidia-smi # running training # ctrl+b d # next time tmux attach -t session_name
-
Tensorboard/Jupyter:
# Jupyter jupyter kernelspec list # python import sys print(sys.executable) print(sys.version) print(sys.version_info)
hostname -I # connect Cisco Annyconnect to CS/Univ's VPN # open local terminal # for Tensorboard ssh -L 6006:localhost:6006 <your_gpu_acct_username>@10.XXX.XXX.XXX # for Jupyter # remote: gpu-interactive hostname -I jupyter-lab --no-browser # local: ssh -L 8888:localhost:8888 <your_gpu_acct_username>@10.XXX.XXX.XXX
- follow
scripts/source_channel.sh
-
download desktop client
-
ubuntu:
- download shadowsocks client
sudo add-apt-repository ppa:hzwhuang/ss-qt5 sudo apt-get update sudo apt-get install shadowsocks-qt5
- download chromium from software center.
- set network proxy with auto mode using
file:///path/to/configs/autoproxy.pac
- download shadowsocks client
-
mac: download
ShadowsocksX-NG
from GitHub.