Skip to content

Instantly share code, notes, and snippets.

View davidsonic's full-sized avatar
🏠
Working from home

jialiduan davidsonic

🏠
Working from home
View GitHub Profile
let mapleader=" "
syntax on
set number
set norelativenumber
set cursorline
set wrap
set showcmd
set wildmenu
set hlsearch
@davidsonic
davidsonic / gist:5bcc4bc2e766d364588c38397660f435
Last active April 22, 2021 20:08
CompCars preprocessing
import os
import os.path as osp
import numpy as np
from collections import Counter, defaultdict
comp_root = '/home/ubuntu/data/CompCars'
img_root = osp.join(comp_root, 'image')
label_root = osp.join(comp_root, 'label')
file_names = []
On Ubuntu Server, you can install Xvfb like this:
$ sudo apt-get install xvfb
To run orca under Xvfb, replace the symbolic link suggested above with a shell script that runs the orca AppImage executable using the xvfb-run command.
#!/bin/bash
xvfb-run -a /path/to/orca-X.Y.Z-x86_64.AppImage "$@"
Name this shell script orca and place it somewhere on your system PATH.
ffmpeg -i in.mp4 -pix_fmt yuv420p -c:a copy -movflags +faststart out.mp4
https://stackoverflow.com/questions/39351244/how-to-uninstall-cuda7-5-from-ubuntu
dpkg -l | grep cuda- | awk '{print $2}' | xargs -n1 sudo dpkg --purge --force-all
https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=deblocal
@davidsonic
davidsonic / gist:5c419db600f24a984d3a6b56b0b2053a
Last active November 4, 2020 17:52
google drive download
pip install gdown
gdown https://drive.google.com/uc?id=1ZCDRRh4wrYDq0O3FOptSlBpQFoe0zHTw
nohup matlab -nodisplay -nosplash -r matlab_command > outfile.txt &
And don't forget to include exit; at the end of matlab_command script.
sudo x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -auth /var/run/lightdm/root/:0 -usepw
sudo apt -y install libflann1.8 libboost1.58-all-dev