## 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...

## Replace Occurrences of a Substring in String with Python

### Introduction

Replacing all or n occurrences of a substring in a given string is a fairly common problem of string manipulation and text processing in general. Luckily, most of these tasks are made easy in Python by its vast array of built-in functions, including this one.

Let's say, we have

## 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

## Python: Check if File or Directory is Empty

### Introduction

Python has a set of built-in library objects and functions to help us with this task. In this tutorial, we'll learn how to check if a file or directory is empty in Python.

### Distinguish Between a File and a Directory

When we'd like to check if a path is

## Python: Check if Variable is a Number

### Introduction

In this article, we'll be going through a few examples of how to check if a variable is a number in Python.

Python is dynamically typed. There is no need to declare a variable type, while instantiating it - the interpreter infers the type at runtime:

variable = 4
another_

## Making HTTP Requests in Node.js with node-fetch

### Introduction

A web application often needs to communicate with web servers to get various resources. You might need to fetch data from or post data to an external web server or API.

Using client-side JavaScript, this can be achieved using the fetch API and the window.fetch() function. In NodeJS,

## Mongoose with Node.js - Object Data Modeling

### Introduction

NoSQL brought flexibility to the tabular world of databases. MongoDB in particular became an excellent option to store unstructured JSON documents. Data starts as JSON in the UI and undergoes very few transformations to be stored, so we get benefits from increased performance and decreased processing time.

But NoSQL

## 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