Posts

Power on Other Devices with Python

Image
  Power on Other Devices with Python Tom Clarke Sep 2  · 3 min read This is a pretty neat little function that not a lot of people know about, called Wake-On-Lan (WoL). It’s built into a lot of desktops and laptops, and as far as I know, some more modern smart TV’s. But what actually is it? WoL is a functionality that keeps the networking card of a device on, with some reserve power, which allows us to send it a message. This specific message is called a ‘magic packet’, and when a magic packet is received by a device, it will power on. Before starting to write the very (and I mean very) short python code for this, there are a few things you need to check. First of all, make sure the devices you want to play around with have WoL capability, and I recommend trying it first with a PC/laptop. To do this you will need to enter the devices BIOS on start-up. In the BIOS you will need to navigate to the power management section, and look for a Wake-On-Lan setting and enable it. It can also be

Encrypting your files using a USB stick key (Python)

Image
  Encrypting your files using a USB stick key (Python) Tom Clarke Aug 31  · 4 min read Cyber security is an increasingly important aspect to our digital lives, and people really underestimate how easily their information can be stolen. In light of this, why not set up a cool little system of your own in python that can encrypt your files! In this post I will go through how you can create a secure location on you windows pc, which will encrypt your important files, unless you plug in one of your USB sticks. Now I won’t pretend that this is the most secure thing you can do to protect yourself, but every little helps and it’s very simple. All you will need is a USB stick, preferably with nothing on it, but that’s not essential. To start with you will want to plug in your USB stick, and make sure it works fine, and clear off any useless or unwanted files. When it appears on your computer, in the side menu, right click on it and click on properties. In here you can give it a name, and in my

Auto-Locking PC when you’re away with Python

Image
  Auto-Locking PC when you’re away with Python Tom Clarke Aug 30  · 3 min read Full disclosure, this is not going to be the most secure way to lock you’re pc, but it is pretty cool. It is also designed on a windows pc, but with some tweaking will work fine on linux or osx. The idea behind this is that we can choose any device as our ‘key’, and when this device is no longer connected to your home network, your pc will automatically lock. In this example I will be using my phone as the key, so if I leave the house but forget to lock my laptop, it will lock itself once my phone disconnects from my WiFi, pretty neat! This little python project couldn’t be simpler and can be done in less than 20 lines of code! To start off with we only need to import two libraries, both of which are built into python, so no installing of external packages which is a bonus. The two packages we need are ‘subprocess’ and ‘ctypes’, which give python access to windows command prompt and system processes. import

Recognising Written Digits with Machine Learning

Image
  Recognising Written Digits with Machine Learning Tom Clarke Aug 30  · 5 min read If you have any experience whatsoever with coding, then you should be familiar with ‘Hello World’ being the first thing you’re ever taught how to do. In the modern world of technology, machine learning is taking over and has so much further potential, but to start with, let’s introduce the ‘Hello World’ of artificial intelligence! One of the fundamental artificial intelligence problems, is teaching a neural network how to see the world and its’ contents in the way you or I do. This is called computer vision. So rather than starting with getting the computer to identify every different object or person, we begin by teaching it how to see handwritten numbers. Doesn’t sound too interesting, but this is just the gateway to machine learning and neural networks! What we will go through here is the most simplified code in python, to get a neural network to identify the number in a picture of a handwritten digit