Shurn the Awesomer
Learning Machine Learning with Josh Gordon

Learning Machine Learning with Josh Gordon

Written on Thu, 29 September 2016

You won't believe how amazingly easy to understand machine learning with Josh Gordon from Google. He has explained almost everything in the simplest steps for any beginner to understand.

Needless to say, you are expected to already know some programming language and linux administration. This is not for absolute IT beginner, but for those who are already programmers, wanting to picking Machine Learning. Be sure to check out his channel.

Here's the first tutorial for you to get started:

Creating Custom Ubuntu Containers in Docker

Creating Custom Ubuntu Containers in Docker

Written on Thu, 29 September 2016

Sometimes, you don't want to use any docker images created by community, but created your own, for many reasons:

  • You built your own application and you want to make an image out of it
  • You are using readily available images, but you made so much customisation you rather make a new container out of it
  • You want to maintain your own image, maybe because the original author no longer maintains it

Whatever the reasons, let me guide you through the steps to create a new image from Ubuntu base.

Download Ubuntu Image


We are going to take the existing Ubuntu 16.04 image and configure it from there. The current latest Ubuntu version at the time of writing is 16.04.

docker pull ubuntu:16.04


You should see somewhat the following:

16.04: Pulling from library/ubuntu
cad964aed91d: Pull complete
3a80a22fea63: Pull complete
50de990d7957: Pull complete
61e032b8f2cb: Pull complete
9f03ce1741bf: Pull complete
Digest: sha256:28d4c5234db8d5a634d5e621c363d900f8f241240ee0a6a978784c978fe9c737
Status: Downloaded newer image for ubuntu:16.04

Next, run the image in bash

docker run -i -t ubuntu:16.04 /bin/bash

Let's make sure we update the ubuntu image with the latest patches:

apt-get update
apt-get dist-upgrade

Next, you may go ahead to install whatever application you want and customise it. Once you're down, you can exit the container.

exit

Generate an image from the container


Show the list of containers.

docker ps -a


It should look like this:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9dbd13c7a5ba ubuntu:16.04 "/bin/bash" 33 minutes ago Exited (0) 10 minutes ago compassionate_joliot


Take note of the Container ID. You need it to make a new image

Next, we need to commit this as a new image.

docker commit 9dbd13c7a5ba newimagename:v1


Be sure to use your container ID and name the container accordingly.

You will now see the new image you've created when you list the images.

docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
newimagename v1 29d9cae9fdfd 9 minutes ago 166 MB
ubuntu 16.04 c73a085dc378 2 days ago 127 MB

Run the new docker image


Now run the newly created docker image

docker run -i -t newimagename:v1 /bin/bash


Substitute the name of the image name with yours.

There you go. You are now running an instance of the newly created image. Exit from the image and list the containers to see your achievement.

exit
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
273f542f36e5 newimagename:v1 "/bin/bash" 14 seconds ago Exited (0) 10 seconds ago cranky_pike
9dbd13c7a5ba ubuntu:16.04 "/bin/bash" 43 minutes ago Exited (0) 19 minutes ago compassionate_joliot


You can see the new container is created from your new image.

Installing Ubuntu on Windows 10

Installing Ubuntu on Windows 10

Written on Fri, 16 September 2016

No, this is not about virtualbox running on windows 10. This is about running ubuntu directly under windows 10 as a powershell. Yes, that's right. You run linux commands on windows filesystems and other stuffs you would expect.

So let's get started. First, you need to be registered under Windows Insider Program. If you are already registered, you can skip ahead to installing Windows Subsystem for Linux.

Registering for Windows Insider Program


Please be warned, programmes under Windows Insider Program are not declared stable yet. It may cause your system to crash. Take caution when you register for Windows Insider Program.
The Ubuntu version in the Windows Store is only 14.04 at the time of writing. The current latest distribution version from Canonical is 16.04. Expect that the version of Ubuntu from Windows Store to be of much earlier versions.

Go to Windows Settings -> Update &s; Security

Select Advanced options

Let's Get Started.

Register your account for Windows Insider Program, or switch to an account that is already registered with Windows Insider Program.

You will be directed to Windows Insider Program Webpage. Let's Get Started. If it prompts you to login, proceed to login with the acount associated with your windows account.

You will be greeted warmly by Microsoft as an insider

Go back to Windows Settings -> Update &s; Security -> Advanced options. Let's get started with the insider program. You will be warned that you will be getting pre-released programmes that may cause instability in your computer. It's not too late to turn back now.

You are given one more warning before confirming that you want to install pre-released programmes on your computer. The only way to remove pre-released programmes completely is to reinstall Windows 10. There is no turning back after this.

So you decided to be part of the Windows Insider Program? Welcome to the edge of the knife, tip of the spear. You will need to restart your computer and it will take quite a while for Windows to reboot. Meantime, grab a cup of coffee.

Installing Windows Subsystem for Linux

You must first enable Developer mode.

Next, go to your control page and select Programs and Features.

Let's Turn Windows features on.

The feature you need to turn on is Windows Subsystem for Linux(Beta). As the beta implies, it's not a complete product yet. Proceed with caution. Select OK and it will install this feature on your computer.

Next, open up PowerShell in administrator mode. Not to be confused with CMD. Powershell is more feature-rich and meant to replace CMD. More information can be found here.

Enter the following commands in Powershell

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
bash


You will be asked if you want to continue to install Ubuntu. Type 'y' to proceed with installation.
You will also be asked to enter a username and a password. This can be different from your Windows Login username and password.

That's it! You have successfully installed Ubuntu on Windows 10.

Now, how about removing it?
This time round, open CMD in administrator mode and type the following commands:

lxrun /uninstall


Your ubuntu home folder will not be removed though. If you want to remove the home folder too, type the following instead:

lxrun /uninstall /full

To reinstall Ubuntu, type the following:

lxrun /install

Adding Cloudflare

Adding Cloudflare

Written on Sat, 3 September 2016

I have added cloudflare to my site. It was such a simple process of setting up a cloudflare account, telling cloudflare my url, and going to my Domain Nameserver to point to cloudflare servers. So easy.

More importantly, I hope nothing goes wrong with my set up. So far, everything seems to be in working order.

Tutorial: Docker installation on Ubuntu 16.04

Tutorial: Docker installation on Ubuntu 16.04

Written on Fri, 26 August 2016

First time Docker user here. So far with whatever I've read, it seems it's a very useful tool to use. Especially if there is a need to run multiple applications in an environment. That way, I shouldn't need to worry about conflicts between applications. So far, my way of isolating applications is by using Virtual Machines, running independent OS. It's not too efficient, but it works. Maintanence is quite a hassle, but I'm quite used to it. I'm going to give Docker a try and see how it will benefit me.

Here's a tutorial on how I installed Docker on Ubuntu 16.04.

Preparing Ubuntu


All commands are running on root. If you're not running on root, be sure to add sudo to every command.
I'm assuming that you are working on a fresh copy of ubuntu 64bit installation. It's a good practise to ensure that you update all your apps before proceeding.

apt-get update
apt-get dist-upgrade

Installing Docker


This part of the tutorial is taken directly off their documentation.

We need to add their repository to get the latest docker stuff.

apt-get install apt-transport-https ca-certificates
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

Now we add their source.

nano /etc/apt/sources.list.d/docker.list


If there is any thing written in it, remove all of it. I doubt there is any, as it's a new ubuntu installation. Then add the following line and save:

deb https://apt.dockerproject.org/repo ubuntu-xenial main

Time to get the docker application.

apt-get update
apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
apt-get install docker-engine
service docker start

Let's give the docker a try and see if it works:

docker run hello-world

You should get something like the following:

Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c04b14da8d14: Pull complete
Digest: sha256:0256e8a36e2070f7bf2d0b0763dbabdd67798512411de4cdcf9431a1feb60fd9
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker Hub account:
https://hub.docker.com

For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/

Congratulations. Have fun and tell me about your experience.

About Me

Greetings Earthlings , Shurn the Awesomer is here to give you an awesome time.

This little site is a record of my life, opinions, and views. I'm mainly writing about Technology & Gadgets, Busting Creationist Myths, and other philosophical stuff.

This site is done using CakePHP.

Uptime

With this uptime, how much more can I be proud of to showcase to the world? This uptime monitoring is brought to you by StatusCake since 13th May 2017.

Copyright

I will always check for copyright usage before using any materials on my site. Whenever due, credit shall be given.

However, if you notice that I may have infringed on any copyright material. Please do not hesitate to contact me. All works of every artist deserves to be honoured and respected.