Dec
06

virtualbox unbuntu install softwares

install java
sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

install open-terminal-here
$ sudo apt-get update && sudo apt-get upgrade
$ sudo apt-get install nautilus
$ sudo apt-get install nautilus-actions
$ nautilus-actions-config-tool * activate the command

for the case the clipboard sharing in virtualbox doesn’t work

$ sudo apt-get install virtualbox-guest-dkms

Dec
06

virtual box static ip setting

  1. set nat
  2. set host-only adapter (please create a network in the general setting, so that you can choose one of them in your host-only setting)
  3. start ubuntu
  4. go to system-network -> host-only network
  5. set your static ip, netmask, (no gateway!!!)
  6. restart!!!

https://superuser.com/questions/1080675/set-virtualbox-network-for-ubuntu-16-04-client?newreg=342b80bd2fd34e448c2c74ff65865b3a

May
02

compare two lists

It is very easy to compare two lists in python, but it seems not so many people know it.

Just use the `==` symbol in numpy, it will return a numpy array with boolean value, True means the position are idential.

import numpy as np

aa = [“a”,”b”,”a”]
bb = [“b”,”b”,”a”]

np.array(aa)==np.array(bb)

>>array([False, True, True], dtype=bool)

see my example code in stackoverflow:

http://stackoverflow.com/a/36983379/3279996