Dilawar's Blog

watch -n 1 /dev/null

22 Nov 2020
20 Nov 2020
18 Nov 2020

Getting X11 (XQuartz) to work on OSX

Today I finally managed to get XQuartz to work on a mac mini. I use this machine as server to test my code for OSX. Its a horrible machine …
12 Nov 2020

argmax in pure Python

Python does not have an inbuilt argmax function. numpy does. Here is one implementation. def argmax(ls : list) -> int: _m, _mi = -math.inf, …
10 Nov 2020
09 Nov 2020
08 Nov 2020
03 Nov 2020

Debugging python extension in gdb

$ gdb -ex r --args python myscript.py If you are using virtual environment then you are likely to run into the following error. …
02 Nov 2020

Saving Blob to a file

Create an url from a Blob using createObjectUrl. Create an element with tag a and use the url generated above. Set properties such as …
01 Nov 2020

Awesome Vue : A personal list

To automatically create links from raw url and email links in v-html directive, use vue-linkify. Create a custom directory such as …