Skip to content

Instantly share code, notes, and snippets.

View patrickmmartin's full-sized avatar

Patrick Martin patrickmmartin

View GitHub Profile
patrickmmartin /
Created February 5, 2017 09:48
update-alternatives for python3 on Ubuntu

Ubuntu 16 default python is almost python 3

Loads of solutions exist, but for changing the system default, alias is not the way to go.

$ update-alternatives --list python update-alternatives: error: no alternatives for python

patrickmmartin / colourwheels.html
Created October 22, 2018 20:36
Javascript colour generation
<!DOCTYPE html>
<div id="colour">???<div>
<button type="button" onclick="start()">Start</button>
var i = 0;
patrickmmartin /
Last active October 8, 2018 10:31
pyopencl setup

pyopencl installations

Linux (Ubuntu)

basic setup

Python Reading Material
patrickmmartin /
Created May 25, 2017 13:55
examples of attempting to add static analysis to comdb2
splint -D_LINUX_SOURCE -Ibb -Ibbinc -Ibdb -Iberkdb -Icdb2api -Icomdb2rle -Icrc32c -Icsc2 -Icson -Idatetime -Idb -Idfp -Idlmalloc -Ilua -Inet -Iprotobuf -Ischemachange -Isockpool -Isqlite -Itests -Itools -Idfp db/*.c

splint +posixlib -D_LINUX_SOURCE -Isqlite/inline -I. -Iberkdb/build -Iberkdb/dbinc -Ibb -Ibbinc -Ibdb -Iberkdb -Icdb2api -Icomdb2rle -Icrc32c -Icsc2 -Icson -Idatetime -Idb -Idfp -Idlmalloc -Ilua -Inet -Iprotobuf -Ischemachange -Isockpool -Isqlite -Itests -Itools -Idfp/decNumber  -Idfp/dfpal -Idb -I/usr/include/x86_64-linux-gnu db/*.c

ls -1 db/*.c | splint -showscan  +posixlib -D_LINUX_SOURCE -Isqlite/inline -I. -Iberkdb/build -Iberkdb/dbinc -Ibb -Ibbinc -Ibdb -Iberkdb -Icdb2api -Icomdb2rle -Icrc32c -Icsc2 -Icson -Idatetime -Idb -Idfp -Idlmalloc -Ilua -Inet -Iprotobuf -Ischemachange -Isockpool -Isqlite -Itests -Itools -Idfp/decNumber  -Idfp/dfpal -Idb -I/usr/include/x86_64-linux-gnu 
patrickmmartin /
Last active May 23, 2017 00:32
Notes on openCL

Integrating opencl into other toolchains


See TODO refs

patrickmmartin /
Created May 15, 2017 23:39
vncserver setup on Ubuntu 16

when Vino-server just does not work (yet again)

Previously, so get access to the file-server desktop, used something like the instructions in the referenced pages to cobble together the start script below (which does not work 100% BTW).

patrickmmartin /
Last active May 15, 2017 20:57
desktop contenary setup from clean
$ mkdir -p src/contenary
$ cd  src/contenary

$ git clone
The program 'git' is currently not installed. You can install it by typing:
sudo apt install git