Processing set up

This post is here as a reminder of what I did to setup my coding environment. If it is of any use or interest to anyone else then that’s great 🙂

First up I set up a VirtualBox VM on my desktop (from Entroware!). It is running an Ubuntu Mate 16.04 guest, but I guess that is inconsequential, as it could be running any version. It has the VirtualBox Additions installed, NAT and Bridge Adaptor networking are enabled, and a shared folder on the host has been setup.

On the guest, the shared folder is mounted using the command:

sudo mount -t vboxsf -o uid=1000 sharedVMfolder path/to/mountpoint

Anaconda Python has been installed on the guest and a new environment called spatialP3 has been created using:

conda create --name spatialP3

This is activated using:

source activate spatialP3

In that environment, a number of spatial libraries have been installed using:

conda install --name spatialP3 packagename

There were a number of version conflicts with some of the default packages, so I searched the Anaconda Cloud to find the most recent packages and installed them from the Anaconda Cloud repository using:

conda install -c conda-forge shapely=1.5.16

and similar.

To launch a Jupyter Notebook server with no local display (i.e. on the guest) use:

jupyter notebook --ip=0.0.0.0 --no-browser

Port forwarding has been set up in Virtualbox using the TCP protocol and with the host port being 8899 and the guest port being 8888 (the default for Jupyter Notebooks).

This means that you can run the notebooks from the host (as long as the VM and Jupyter server are both running) by typing the following into your browser:

localhost:8899

or from any machine on the network by typing in the local IP address of the host machine and the port 8899. If you start them in the correct location i.e. the shared folder that was mounted in the VM, then the notebooks will be accessible irrespective of whether the VM is running, and can be part of a backup strategy for the host machine.

Advertisements
Tagged , ,

Stat

Another nice little bash tool that I’ve recently come across is stat.

More details can be found here: http://www.computerhope.com/unix/stat.htm

but basically it returns the status of a file or filesystem.

Ubuntu Mate Lenovo microphone fix

On a Lenovo G50 I have access to there was no sound being recorded by the internal microphone. This was a problem with Skype and Hangouts. The following fixed the issue:

  • sudo apt-get install pavucontrol
  • Type pavucontrol in the terminal
  • A new window will open. Click on the Input Devices tab at the top of the window
  • With Port set to Internal Microphone:
  • Move the Front Left slider bar to more than 85% and the Front Right slider bar to between 60% and 70%
  • Start your Skype conversation and keep tweeking the sliders in pavucontrol

Based on a post here: http://ubuntuforums.org/showthread.php?t=2270010

Tagged

Yes!

A little trick to help test the cpu load on a multi-core machine.

Open a Terminal and type the following and press Enter.

yes > /dev/null &

You may need to repeat the command for as many cores as your CPU has in order to stress to the maximum. To kill the ‘yes’ command (which writes a string continuously) use:

killall yes

And use it at your own risk 🙂

Search for last command of type…

If you need to find a previous command of a specific type e.g. mount

history | grep -i mount

Tagged , ,