knorth55's memo

Technical memo by @knorth55


Get matched list quickly in python

If you do not consider the list order, it is better to use set and & operator. a = [1, 2, 3] b = [2, 3, 4] c = sorted(list(set(a) & set(b)))

Specify GPU devices on ChainerMN

Use CUDA_VISIBLE_DEVICES environment variable as below. CUDA_VISIBLE_DEVICES=0,2,3 mpiexec -n 3 python