Machine learning course

Time to (re)learn matlab/octave.
Some material is still locked because the course begins in 3 days.
It doesn’t seem easy at all even if it supposed to be introductory.

Material from previous years from the official Stanford course:

Download videos:

See code:

note: Copying the solutions would be cheating but I don’t expect Andrew Ng to put the same questions this course and he has put no questions yet.
They’re no secret being the first ones to come up on github searching for “ml octave”.

x230 iker ~ $ sudo apt-add-repository ppa:octave/stable
x230 iker ~ $ sudo apt-get update
x230 iker ~ $ sudo apt-get install octave octave-info
x230 iker ~ $ octave --force-gui
GNU Octave, version 4.0.0

Jetson TK1 again… (part1)

Note: post to be updated.

I’ve to use it again and since Nvidia released the super expensive TX1, is not easy to find info for the now old TK1.

It requires to be a member of

The software for ubuntu is downloaded from:

And Nvidia has detailled instructions for ubuntu here:

They’ve packaged everything together and the TK1 has to be selected when  installing or stuff for the TX1 will be installed. Clearly the TK1’s software is behind the TX1. The latest one was from July 2015, r21.4

How to enable the wireless card:

Common mistakes:

I was testing it under virtualbox but it couldn’t flash the image because virtualbox couldn’t see the board.

Install the virtualbox extension pack and then

sudo usermod -G vboxusers -a $USER

then restart user session and make sure to add the new device when told so because  when the Jetson is in recovery mode it changes it’s ID.

iker@rosvm:~$ lsusb
Bus 001 Device 003: ID 0955:7140 NVidia Corp. 
Bus 001 Device 002: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II], GT-I9300 Phone [Galaxy S III], GT-P7500 [Galaxy Tab 10.1]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Just after installing it this has to be done to avoid newer unsuported versions of nvidia drivers.

sudo apt-mark hold xserver-xorg-core

Their bug feedback form is here:

it shouldn't be used before trying many things before.

problems with host armhf

I could not do an apt-get update without errors so I deleted all armhf packages because the nvidia installator did something wrong.

root@x230:/etc/apt$ cat /etc/lsb-release 

root@x230:/etc/apt$ sudo apt-get update && sudo apt-get upgrade
Err trusty-updates/main armhf Packages     
  404  Not Found [IP: 80]

root@x230:/etc/apt$ sudo apt-get remove --purge `dpkg --get-selections | grep i386 | awk '{print $1}'`

# dpkg --print-foreign-architectures

root@x230:/etc/apt# dpkg --remove-architecture armhf

extract solidworks preview from file

algoI needed to see the preview of the file Completo.SLDASM, a Solidworks file but Freecad couldn’t open the file.

This does the trick extracting a PNG inside the file. It is not 3D but it is fast and allows me to see if that is the file I am looking for.

x230 iker ~ $ sudo apt-get install libgsf-bin imagemagick

x230 iker ~ $ gsf cat Completo.SLDASM PreviewPNG >result.png
x230 iker ~ $ file result.png 
result.png: PNG image data, 640 x 480, 8-bit/color RGBA, non-interlaced 


Invert xwindow colors without compiz

I don’t like compiz because it is very slow on my computer but I miss to be able to invert the colors specially when I am in bed at night.

iker@x230:~$ sudo apt-get install xcalib
iker@x230:~$ xcalib -invert -alter

Now how to add a keyboard shortcut for it on XFCE

    iker@x230:~$ xfce4-keyboard-settings


Settings -> keyboard -> Aplication shortcuts
xcalib -invert -alter = Super + N

Hello Ansible

I left programming and got a job doing sysadmin tasks. Now it seems people doing this kind of job are called DevOps so I am not really a sysadmin or a programmer.

  • DevOps (a clipped compound of “development” and “operations”) is a culture, movement or practice that emphasizes the collaboration and communication of both software developers and other information-technology (IT) professionals while automating the process of software delivery and infrastructure changes”

I thought Orson Scott invented the term Ansible for instantaneous communications though space in Ender’s Game but it was invented before.

  • “The word ansible was coined by Ursula K. Le Guin in her 1966 novel Rocannon’s World. Le Guin states that she derived the name from “answerable,” as the device would allow its users to receive answers to their messages in a reasonable amount of time, even over interstellar distances”


Orson Scott Card created Jane though, an A.I created from the Ansible network itself.

Now I’ve to learn how to use a program called Ansible for server provisioning and orchestation. The basic idea is to make a playbook (a specially formated text file with instructions) and use it with an inventory of servers. Ansible will make sure everything is well installed and will take care of most errors. The same could be done using bash scripts though SSH  but Ansible does a lot of checks and the same script can be used several times without changing the first result making sure the servers are in a known state.

Ansible has a property called Idempotence

  • “Idempotence (/ˌdɨmˈptəns/ EYE-dəm-POH-təns ) is the property of certain operations in mathematics and computer science, that can be applied multiple times without changing the result beyond the initial application.”

I can not post here the scripts I am doing at work but I will post something with examples just to remember it.