Blog


My musings, ramblings, and babblings

Disclaimer: Any views or opinions expressed here in this blog are entirely my own and do not necessarily represent the views or opinions of my employer.

Reverse digits

Write a program which takes an integer and returns the integer corresponding to the digits of the input written in reverse order. For example, the reverse of 42 is 24 and the reverse of -314 is -413. Brute force approach: def reverse_digits_brute_force(i):... [Read More]

Compute x to the yth power

Write a program which takes two integers x and y and returns the power of x to the y. This is very easy in Python using the built-in pow function: def power_x_y(x, y): return pow(x<span... [Read More]

Computing parity of a word

Write a program which takes a very large number of 64-bit binary words and calculate the partity of word. The parity of the word is 1 if the number of 1 is in the word is odd; otherwise, it is 0. Brute force approach: def <span... [Read More]

MLMetrics.jl 0.1.0

I’m excited to announce MLMetrics.jl, a new Julia utility package for scoring models in data science and machine learning. This toolset’s API follows that of Python’s sklearn.metrics as closely as possible so one can easily switch back and forth between Julia and Python without too much cognitive dissonance. The... [Read More]

titanic 0.1.0

I’m excited to announce titanic, a new R package containing data sets providing information on the fate of passengers on the fatal maiden voyage of the ocean liner “Titanic”, with variables such as economic status (class), sex, age and survival. These data sets are often used as an introduction to... [Read More]