Monday, December 03, 2018

The new 4.19 kernel is causing trouble

A "kworker" process is hogging my CPU. I have to go back to 4.18 kernel to resolve this issue.

UPDATE (01/24/2019)

The solution is amazingly simple. Follow this post:

  1. Install perf;
  2. sudo perf record -g -a sleep 10
  3. sudo perf report
Scrolling down the records, it looks like the problem is related to my USB hub. Unplug the hub and the problem goes away. 

Saturday, December 01, 2018

Thursday, November 29, 2018

Saturday, November 24, 2018

Friday, November 02, 2018

Installing VMware workstation 15 on Manjaro

A few things to notice:

  1. Need to install Linux header files;
  2. Consult the pinned comments here.
A few useful commands:
  • sudo modprobe -a vmw_vmci vmmon
  • sudo vmware-modconfig --console --install-all
  • sudo systemctl enable vmware-networks
  • sudo systemctl start vmware-networks

Thursday, October 18, 2018

Zapcc with Rstan

I use the brms package, which uses the standard R formula syntax to generate Stan code, which gets translated into C++ code by rstan, get compiled and executed. In this process, a optimized C++ compiler can make a big difference.

Here I ran the brms sample code for the spatial simultaneous autoregressive (SAR) sample code using clang++ and zapcc and benchmared the performance (three times):

clang++: 66.89 (lagsar), 49.02 (errorsar)
zapcc: 56.80 (lagsar), 18.43 (errorsar)

Such a performance boost can be achieved by simply switching a compiler!

Saturday, October 13, 2018

Wednesday, July 04, 2018


Data science toolkit for Arch and Arch-based system here.

Monday, April 16, 2018

Scraping HTML tables

A few useful examples:


Thursday, March 08, 2018

How to get county FIPS from state and place names

This post demonstrates how to use the acs package to extract county FIPS from arbitrary combination of state and city names.

For Stata users, the geoinpoly package can extract FIPS from a combination of latitude and longitude coordinates.

Friday, February 16, 2018

Monday, February 12, 2018

Monday, February 05, 2018


NetLogoR is the first serious ABS system implemented in pure R language, and it is based on the proven NetLogo framework.

Friday, January 12, 2018

Tmap package on Manjaro

I was having problem installing the tmap package on Manjaro. Here is a fix.

Thursday, January 11, 2018

R jumps to 8th position in TIOBE language rankings

This is crazy, R is used by more developers than PHP, Perl, Ruby, and Swift.

Sunday, January 07, 2018

Integrating Rstudio and Zotero

It is now possible to integrate Rstudio and Zotero seamlessly via the combination of the citr R package and the Better Bib(La)TeX for Zotero/Juris-M extension for Zotero. This means that there is no long a need to create a separate bibtex library for each project; instead, one can create and maintain one giant Zotero library (with many different subfolders maybe) for all projects. According to this post, it will soon be possible to work with Zotero group libraries (i.e., libraries other than the main "My Library").

01/08/2018 Correction: the group library functionality is already available in the github version of the citr package. Good work.