├── Check-GPU-occupy-on-the-fly.sh ├── Check_FileNum.sh ├── Check_System_Distribution.sh ├── Check_TensorFlow_Version.sh ├── Count_File_Lines.sh ├── Count_Folder_Num.sh ├── Delete_DS_Store.sh ├── Draw_Caffe_TrainingLog.sh ├── Import_Caffe_Pycharm.py ├── Mount_Remote.sh ├── README.md ├── Search_and_Mount_Disk.sh ├── Select_GPU2Run.sh ├── Select_HeadfromList.sh ├── Select_TailfromList.sh ├── Shuffle_List.sh ├── Start_Ipython_Notebook_in_Mac.sh └── anaconda_bashrc.sh /Check-GPU-occupy-on-the-fly.sh: -------------------------------------------------------------------------------- 1 | # nvidia-smi -l 1 2 | # real time gpu occupy 3 | watch -d -n 0.01 nvidia-smi 4 | -------------------------------------------------------------------------------- /Check_FileNum.sh: -------------------------------------------------------------------------------- 1 | ls -l | grep "^-" | wc -l 2 | 3 | ls -lR|grep "^-"|wc -l 4 | -------------------------------------------------------------------------------- /Check_System_Distribution.sh: -------------------------------------------------------------------------------- 1 | lsb_release -a 2 | -------------------------------------------------------------------------------- /Check_TensorFlow_Version.sh: -------------------------------------------------------------------------------- 1 | python -c 'import tensorflow as tf; print(tf.__version__)' 2 | -------------------------------------------------------------------------------- /Count_File_Lines.sh: -------------------------------------------------------------------------------- 1 | grep -vc '^$' file.txt 2 | -------------------------------------------------------------------------------- /Count_Folder_Num.sh: -------------------------------------------------------------------------------- 1 | echo */ | wc 2 | 3 | ls | wc -l 4 | -------------------------------------------------------------------------------- /Delete_DS_Store.sh: -------------------------------------------------------------------------------- 1 | find . -name "*.DS_Store" -type f -delete 2 | -------------------------------------------------------------------------------- /Draw_Caffe_TrainingLog.sh: -------------------------------------------------------------------------------- 1 | python ./softwares/caffe-master/tools/extra/plot_training_log.py 6 MS-LowShot-ResNeXt101.png ResNeXt101.log 2 | -------------------------------------------------------------------------------- /Import_Caffe_Pycharm.py: -------------------------------------------------------------------------------- 1 | import sys 2 | caffe_root = '/home/zhaojian/software/caffe-master/python' 3 | sys.path.insert(0, caffe_root) 4 | import caffe 5 | -------------------------------------------------------------------------------- /Mount_Remote.sh: -------------------------------------------------------------------------------- 1 | sshfs -o idmap=user your_username@your_remote_ip_address:your_remote_document_dir your_local_document_dir 2 | # e.g. sshfs -o idmap=user zhaojian@172.16.126.205:/home/zhaojian/ /Users/zhaojian/Desktop/DEEP 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Ubuntu Useful Instructions 2 | -------------------------------------------------------------------------------- /Search_and_Mount_Disk.sh: -------------------------------------------------------------------------------- 1 | sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL 2 | 3 | sudo mkdir /media/usb_1 4 | sudo mkdir /media/usb_2 5 | 6 | sudo mount -t exfat /dev/sdd1 /media/usb_1 7 | sudo mount -t ntfs /dev/sde1 /media/usb_2 8 | -------------------------------------------------------------------------------- /Select_GPU2Run.sh: -------------------------------------------------------------------------------- 1 | export CUDA_VISIBLE_DEVICES=device_id 2 | -------------------------------------------------------------------------------- /Select_HeadfromList.sh: -------------------------------------------------------------------------------- 1 | head -n 50 your_file.txt > your_file_head.txt 2 | -------------------------------------------------------------------------------- /Select_TailfromList.sh: -------------------------------------------------------------------------------- 1 | tail -n 50 your_file.txt > your_file_tail.txt 2 | -------------------------------------------------------------------------------- /Shuffle_List.sh: -------------------------------------------------------------------------------- 1 | sort -R your_file.txt > your_file_rand.txt 2 | -------------------------------------------------------------------------------- /Start_Ipython_Notebook_in_Mac.sh: -------------------------------------------------------------------------------- 1 | python -m Ipython notebook 2 | -------------------------------------------------------------------------------- /anaconda_bashrc.sh: -------------------------------------------------------------------------------- 1 | # >>> conda init >>> 2 | # !! Contents within this block are managed by 'conda init' !! 3 | __conda_setup="$(CONDA_REPORT_ERRORS=false '/media/pc/6T/jasonjzhao/softwares/anaconda2/bin/conda' shell.bash hook 2> /dev/null)" 4 | if [ $? -eq 0 ]; then 5 | \eval "$__conda_setup" 6 | else 7 | if [ -f "/media/pc/6T/jasonjzhao/softwares/anaconda2/etc/profile.d/conda.sh" ]; then 8 | . "/media/pc/6T/jasonjzhao/softwares/anaconda2/etc/profile.d/conda.sh" 9 | CONDA_CHANGEPS1=false conda activate base 10 | else 11 | \export PATH="/media/pc/6T/jasonjzhao/softwares/anaconda2/bin:$PATH" 12 | fi 13 | fi 14 | unset __conda_setup 15 | # <<< conda init <<< 16 | export PATH=/media/pc/6T/jasonjzhao/softwares/anaconda2/bin:$PATH 17 | --------------------------------------------------------------------------------