Inheritance in Python

Posted by Jack McKew on Fri 13 September 2019 in Python • Tagged with python • 2 min read

As Python is a high level, general purpose programming language, which supports users to define their own types using classes, which are most often following the concept of object-oriented programming. Object-oriented programming is a type of software design in which users not only define the data type (eg, int) of …


Continue reading

Dunders in Python

Posted by Jack McKew on Fri 06 September 2019 in Python • Tagged with python • 3 min read

A 'dunder' (double underscores) in Python (also known as a magic method) are the functions within classes having two prefix and suffix underscores in the function name. These are normally used for operator overloading (eg, __init__, __add__, __len__, __repr__, etc). For this post we will build a customized class for …


Continue reading

Python Project Workflow

Posted by Jack McKew on Fri 30 August 2019 in Python • Tagged with python • 5 min read

This post will go through my personal preference on project structure and workflow for creating a new project and an insight how I work on my projects from a development point of view. I will go from the very start as if I did not have Python/Git installed on …


Continue reading

Linear Regression: Under the Hood with the Normal Equation

Posted by Jack McKew on Sun 25 August 2019 in Data Science • Tagged with python • 3 min read

Let's dive deeper into how linear regression works.

Linear regression follows a general formula:

$$ \hat{y} = \theta_0 + \theta_1x_1 + \theta_2x_2 + \cdots + \theta_nx_n $$

Where \(\hat{y}\) is the predicted value, \(n\) is the number of features, \(x_i\) is the \(i^{th}\) feature value and \(\theta_n\) is the \(n^{th}\) model parameter. This …


Continue reading

Intro to Web Scraping

Posted by Jack McKew on Fri 23 August 2019 in Python • Tagged with python • 4 min read

Following on from last weeks post where we analysed the amount of repeated letters within current New Zealand town names. There was still one part of that analysis that really bugged me, and if you noticed it was from the data set that was used was using the European town …


Continue reading

Looking for Patterns in City Names & Interactive Plotting

Posted by Jack McKew on Fri 16 August 2019 in Python • Tagged with python, datascience • 5 min read

Recently, I was traveling around New Zealand, and noticed in the Maori language they use letters back to back a lot like in the original Maori name for Stratford ("whakaahurangi"). So as any normal person does, I thought, well what town has the most repeated letters, and the idea for …


Continue reading

PyCon AU 2019 Sunday In Summary

Posted by Jack McKew on Wed 07 August 2019 in Python • Tagged with python, pyconau • 4 min read

This is a follow on from my last post PyCon AU 2019 Saturday In Summary.

Day 2

The real costs of Open Source Sustainability \@vmbrasseur

The key takeaway that I got from this talk, was the typical reaction for problems which are far away from yourself or out of your …


Continue reading

PyCon AU 2019 Saturday In Summary

Posted by Jack McKew on Tue 06 August 2019 in Python • Tagged with pyconau, python • 5 min read

My first ever conference, learning things I'd never even think of, meeting lots of new people and making my to-do list full of new things to learn. All this happened over the weekend at PyConAU 2019. This post is dedicated to all the fantastic people I met that gave me …


Continue reading

Python and OCR

Posted by Jack McKew on Fri 28 June 2019 in Python • Tagged with python, ocr • 4 min read

This post will demonstrate how to extract the text out of a photo, whether it being handwritten, typed or just a photo of text in the world using Python and OCR (Optical Character Recognition). While this is something that humans do particularly well at distinguishing letters, it is a form …


Continue reading

Python and Data Security (Hashing Algorithms)

Posted by Jack McKew on Fri 21 June 2019 in Python • Tagged with python, security • 5 min read

Data security is becoming more and more prevalent in today's society than ever before. We must make a conscious effort to secure both our physical lives, but also our digital lives as well. With data privacy, sharing of information and access control becoming integrated into most people's life in some …


Continue reading