coding

September 7, 2018

2018.8.30 THU - 9.2 SUN

iOSDC (iOS Developer conference) - an annual event held at Waseda University, Tokyo for all iOS Developers. This is the third year running and there are more attendants, speakers and sponsors than ever. One of the sponsors, Wantedly, is a Japanese company which operates a website for job seekers, similar to LinkedIn. Wantedly sponsored 10 scholarship students for iOSDC 2018. This involved covering transp...

July 25, 2018

If you want to update the available content of your app, take for example a newsletter app, iOS updates are clearly not the way to go, for obvious reasons. Instead, the content can be uploaded to a server and JSON file put in place to guide the app to new content. JSON is a coding language and a file extension (.json). You will need: your newsletter content posted online (PDF) with a direct link, a JSON file containing the URL...

May 7, 2018

Welcome to the third instalment of  the Arduino Series, where I will show you how to implement various concepts of Control Theory in order to control different aspects of a motor device.

In this one, I will show you how to control a motor so that it will be able to reach and more importantly maintain a desired...

December 1, 2017

Part 2 of the series will explain how to use the theory shown in Part 1 in python. Firstly, we will import some libraries and initiate pygame, as usual.

import pygame
import time
from math import radians, sin, cos, sqrt

pygame.init()

xSize, ySize = 1600, 800
screen = pygame.display.set_mode((xSize, ySize))
pygame.display.set_caption(
"3D Graphics")

The variable depth is the distance between the 'eye' and 'screen', discussed in Part...

November 11, 2017

In order to successfully display 3D graphics, you need to convert 3-dimensional coordinates into 2-dimensional coordinates, to go on screen. Before we start, I'd like to make it clear that coordinates x, y, z refer to width, height and depth respectively. As an example, if your screen was of size 1980x1080, and you wanted to display a 3D point (0,0,z1) relative to the camera, the 2D pixel coordinates would be (990,540), the mi...

November 7, 2017

In this post, we will be looking at how to program a simple image classifier using a pre-trained model called VGG16 from Keras and the popular computer vision library OpenCV.

Keras is basically an open source neural network library for Python that contains models to tackle any data problem that we want to solve. For image classification, we will be using VGG16, which is a 16-layer deep convolutional network used by the VGG team...

September 22, 2017

The mcpi.minecraft library is an API which allows Minecraft to be controlled with Python. It is automatically installed with Raspian and can only use the Minecraft-Pi edition. This blog will show you how to make a basic clock in Minecraft. The clock's format is six columns of varying heights. From right to left, they will be units of second, tens of seconds, units of minutes, tens of minutes, units of hours and tens of hours....

August 29, 2017

In this post, I will be demonstrating and showing you guys how to build and train a simple linear model with Python using the popular machine learning library TensorFlow. The reason I am opting to use TensorFlow is because it's really concise and easy-to-use, especially for beginners wanting to learn how to do machine learning. It really breaks down the hard mathematical functions that machine learning requires and transforms...

July 20, 2017

Part 2 of this series will look at adding a first person view mode to our solar system simulator. Please read part 1 before reading this.

There are two new variables to be added after the line 'view_mode = 0'. When the view mode is set to 0, the user will see a top down view and a view mode of 1 will display the first person view. We will set the field of view (fov) to 90 degrees. The variable 'offset' will be the angle at whic...

May 25, 2017

In this series, I will explain how to create realistic orbital physics in a 2-dimensional solar system. We will use the key formula:

Where F is the force of gravity between two object, G is the gravitational constant (6.67x10^-11), M and m are the masses of the objects and r is the distance between their centers of mass.

First, we'll import some libraries.

import pygame
import time
import os
from random import randint
f...