Posted on 2019-11-18T08:49:23Z by Kevin Foong
Using Python to analyse a dataset on Premier League soccer matches around the metrics of "possession" and "matches won", reveals some interesting findings. This is a previous assignment I did for my Udacity Nanodegree in Data Analysis.
In season 2015/2016 Leicester City won the league at starting odds of 5000-1. Their possession stats (number of matches where they had more possession than the opposition) put them 3rd from bottom, but then we can deduce that perhaps they were also a lethal counter-attacking side.
Read more ...
Posted on 2019-08-25T04:10:15Z by Kevin Foong
Doing this design exercise brought me to the topic of IE 11, as you do, when you find out your design doesn't quite work properly on IE 11 but working fine on all other browsers. So I check ever so often at the stats to see when IE 11 is ever going to die out - it seems it is quite a stayer. It is interesting though to know that Microsoft themeselves are actually discouraging users from using IE. This blog post "The perils of using Internet Explorer as your default browser" is quite an interesting read.
Posted on 2019-05-08T11:59:33Z by Kevin Foong
This is the classic Snake game that I created in Processing. It is based off Dan Schiffman's great Processing tutorials here.
To play you have to eat the food (in green) but avoid the poison (in purple). The green food is worth 2 points. After a while it turns pink and is only worth 1 point. If you eat the poison 3 points is deducted. The controls is via a 3x3 grid mainly because it was originally designed to run on a mobile phone.
See Snake Game
Posted on 2019-05-06T13:03:57Z by Kevin Foong
"Garden" is an orginal sketch I created in Processing (P5.js)
This sketch experiments with bezier curves. Click anywhere on the grass to grow your own garden!
Posted on 2019-05-05T07:25:52Z by Kevin Foong
To play click anywhere on the screen to spawn a "moon".
See Sun & Moon
Read more ...
Posted on 2019-04-30T04:33:47Z by Kevin Foong
In this post I will run through process of setting up the TinyMCE editor with Flask. TinyMCE is a great WYSIWYG editor and suitable for things like blog posts. It also enables you to upload images directly into your text.
Follow the instructions below to set up TinyMCE as a local download.
- In Flask I create your forms as per normal using Flask-WTF. Note that the
post field is defined as a TextAreaField. Later we will be using the TinyMCE editor to replace this field.
heading = StringField('Title', validators=[InputRequired(), Length(max=100)])
post = TextAreaField('Write something')
tags = StringField('Tags')
submit = SubmitField('Submit')
- Now download TinyMCE (see https://www.tiny.cloud/docs/general-configuration-guide/advanced-install/#sdkinstall)
and unzip the contents into a web accessible location. I downloaded mine into a folder named "tinymce" under the static folder.
- Create a route which will look something like this.
Read more ...