Java: Check if File or Directory is Empty

Introduction In Java, working with files and directories is rather common. We are also often interested in the contents of those files and directories. Depending on the contents of the file, we might want to behave differently. We might be writing some data into a file and we first want...
Continue Reading

Kernel Density Estimation in Python Using Scikit-Learn

Introduction

This article is an introduction to kernel density estimation using Python's machine learning library scikit-learn.

Kernel density estimation (KDE) is a non-parametric method for estimating the probability density function of a given random variable. It is also referred to by its traditional name, the Parzen-Rosenblatt Window method, after its

Continue Reading

Guide to String Interning in Python

Introduction

One of the first things you encounter while learning the basics of programming is the concept of strings. Similar to various programming languages, Python strings are arrays of bytes representing Unicode characters - an array or sequence of characters. Python, unlike many programming languages, doesn’t have a distinct

Continue Reading