Glen Berseth

I am an assistant professor at the University de Montreal and Mila. My research explores how to use deep learning and reinforcement learning to develop generalist robots.

misc Articles



  • Tue 03 September 2013
  • misc

Generating Latex table of Matlab/Octave Matrix

Glen Berseth


I created some code in Octave/Matlab to generate latex table from matrix data. I created this because in my case I was tuning some data and algorithms for a paper I was writing and I loathed entering my data into the latex over and over in large tables.

The …


  • Sun 19 May 2013
  • misc

psycopg2 instering an array of polygons

Glen B

This post is an example of how to insert an array of polygons into the Postgres database using Python and psycopg2.

The most important and problematic part of inserting a polygon array is the string formatting for the polygon[].

The first thing I tried was to just make a string …



  • Sun 21 April 2013
  • misc

Install Twiki on Ubuntu 12.04

Glen B


This is short guide on how to install Twiki ~5.13 on Ubuntu 12.04. This guide has a fix or two that was not present in any other guide I found.

  1. Install all of the relevant dependencies.

    sudo apt-get install apache2 libgdal-perl libcgi-session-perl libhtml-tree-perl liberror-perl libfreezethaw-perl libgd2-xpm rcs libapache2-mod-perl2-doc …