Assigning Exam Grades.

This post will be focusing on the bisect module available from Python. According to Python documentation, the bisect module provides support for maintaining a list in sorted order without having to sort the list after each insertion. This searching and insertion into a list can be used to assist with a common task that teachers/lecturers […]

Travelling Salesman Problem. A Brute Force Approach.

The travelling salesman problem asks the following question: “Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city and returns to the origin city?” In the following post, the cities are represented by coordinates on a Cartesian plane. The distance (Euclidean distance) […]

Machine Learning. Pipeline.

A machine learning pipeline is the overall process from data processing up till model prediction of the data. It could be considered as being a sequence of actions (e.g. data imputation / data scaling / encoding of categorical values / hyperparameter tuning / model selection) which could be broken down into smaller ‘components’ or functions. […]

Machine Learning. Classification with kNN.

This post will be looking at using the k-Nearest Neighbour (kNN) algorithm for a classification problem. Suppose there is a new data point that is required to be classified into one of the known categories that comprises the data. This algorithm will look at the k closest points (where k is an integer specified by […]

Interactive Data Visualisation. Bokeh.

Data visualisation allows complex relationship between parameters of a dataset to be understood easily and quickly. The Matplotlib package is a common and convenient Python package for data visualisation. However, let’s take a look at another Python package called Bokeh, as it allows the user to do a bit more. Publicly available HDB resale prices […]

Managing Laboratory Inventory (Consumables).

An adequately stocked consumables inventory is essential for the smooth operation of any research laboratory. Someone in the lab needs to take on the task of the regular trips to the lab store to replenish a trolley-load of consumables, lest face the wrath of fellow lab users. In academic research labs, there is usually a […]

HPLC Calibration Curve and Data Analysis.

One common analysis a chemist does in a laboratory is the use of high performance liquid chromatography (HPLC) to determine the concentration of a particular analyte. After the method development is complete, a typical workflow for sample analysis is as follows:i) Measurement of the peak areas of various known concentration of the calibration standard.ii) Plot […]

A Little Bit of Reaction Engineering.

This post will be a little (just a little…) intensive on the physical chemistry side of things as I explore the other functions of the Python Programming Language, using an example on reaction kinetics.Let’s consider the following reaction scheme showing the elementary reactions, where the starting material A gets converted to B with a rate […]