Monthly Archives: July 2020

Casting shared pointers in C++

Here’s a note on my experience with casting a base class shared pointer to a derived class pointer.

Posted in Uncategorized | Leave a comment

Notes on Reservoir Sampling

Reservoir sampling is a useful technique when sample k items for a large data sets. In this post I outline some ideas on how it works.

Posted in Uncategorized | Leave a comment

How to trim text in List of Figures / Tables (Latex)

Sometimes we have really long texts in the list of figures and list of tables part (\listoffigures, \listoftables). The text correspond to the captions of the figures and tables. We can trim the text using an optional argument to the … Continue reading

Posted in Uncategorized | Leave a comment

Get Pylint to work with Python 3 programs

Here’s my note on getting Pylint to work with Python3. The issue is that I also have Python2.7 installed on the machine. As a result, when I just run “pylint python3_program_name.py”, the script gives “invalid syntax” errors. One trick I … Continue reading

Posted in Uncategorized | Leave a comment