I work as a software developer for a company that develops climate control systems for greenhouses. These climate control systems control various aspects of a greenhouse to create an optimal climate for growing crops. We connect the system to several sensors, and the system sends the measurements of these sensors to a central location in the cloud.
The grower, our customer, can access these measurements through various dashboards that include graphs and reports. Last week, we received a customer call through the helpdesk that he did not see any new measurements come in. …
I like to use practical examples and projects to help me memorize the theory during my study of Deep Neural Networks. An excellent resource for finding these practical projects is Kaggle. Kaggle is an online community of data scientists and machine learning practitioners.
Kaggle allows you to search and publish data sets, explore, and build models. You can perform these functions in a web-based environment. Kaggle also offers machine learning competitions with actual problems and provides prizes to the winners.
I am currently studying Deep Learning with TensorFlow. One of the subjects I want to learn is image recognition. This article describes my attempt to solve a former Kaggle competition from 2013, called “Dogs vs. Cats.” For implementing the solution I used Python 3.8 …
This article describes my attempt at the Titanic Machine Learning competition on Kaggle. I have been trying to study Machine Learning but never got as far as being able to solve real-world problems. But after I read two newly released books about practical AI, I was confident enough to enter the Titanic competition.
The first part of the article describes preparing the data. The second part shows how I used a Support Vector Machine (SVM). I used the SVM to create a model that predicts the survival of the passengers of the Titanic.
The model resulted in a score of 0.779907, which got me in the top 28% of the competition. I am very happy with the result. You can find a Jupiter notebook with the solution and documentation in Github. …
A week ago, I saw a tweet from Ashley Willis (@ashleymcnamara) in which she asked, “What’s the best tech talk you’ve ever seen?”. The response was overwhelming. Make sure to check out the answers for some of the most excellent tech talks.
Since then, I have been watching some of the recommended talks. The first I saw was “Discovering Python” by David Beazley. An exceptional talk in which he uses Python to support a Patent litigation lawsuit.
As I searched for more talks by David Beazley, I found “Builtin Superheroes.” In this presentation, he used standard Python data types to analyze food inspections. …
Python offers three types of comprehensions to create basic collection data types conveniently in Python with better readability.
I will explain each type of comprehension using examples.
List Comprehensions are a different way of rapidly creating a list with Python. If you find yourself using a for loop along with .append()
to create a list, List Comprehensions are an excellent alternative.
List Comprehensions have the following signature.
[expr for val in collection if condition]
You can use List Comprehensions for the following:
I will explain the possibilities of List Comprehensions using four different examples. Each example shows how to implement the functionality with and without List Comprehensions. …
Almost twenty years ago, I started as a developer in a company that used code reviews. At that time, I had never done a code review nor was my code ever reviewed.
For my first project, I had to create a COM component in C++ using the ATL framework. ATL uses reference counting to manage the lifetime of an object. Reference counting means that you have to call Release()
when you are done using the object. If you forget to call it, it results in a memory leak.
I remember the result of my first code review as if it was yesterday. …
When during the execution of a program, Python encounters an error, it stops. This can be caused by two types of errors, syntax errors, or exceptions. In this article, we will discuss the second, exceptions, and show how to handle, catch, and raise them.
Exceptions are errors that Python reports when syntactically correct code executes, and an exceptional situation occurs. For example, look at the following code.
This program tries to divide the number ten by zero, which is something that is not possible in Python.
When you execute this program, Python raises a ZeroDivisionError and terminates the application. …
The standard library with each Python installation contains a logging module that provides a flexible framework for logging messages. Most Python applications and libraries use this module.
There are four types of classes used when logging.
To create a logger in your application or library, you can call logging.getLogger("app")
. The argument "app"
is the name that you choose for this logger. You can use the name of a logger to form a hierarchy by using dots in the name like 'app.module.function'
. A Filter can use this hierarchy to only view messages from a specific function or module. …
Every year I try to learn a new programming language. This year I started learning Python.
During my day job, I work as a professional programmer. I use C++, C#, and Javascript. I am part of a development team that uses unit testing to verify if our code works how it should.
In this article, I investigate how to create unit tests with Python by discussing the following topics.
To be able to follow along with this article, I assume that you have a basic understanding of Python. …
Ever since I heard the computer W.O.P.R. ask Matthew Broderick if he wants to play a game, I have been fascinated by talking to computers. W.O.P.R. was the United States military supercomputer from the movie Wargames.
I remember trying to create a program in BASIC on my Commodore 64. This program simulated W.O.P.R. It read a string from the command-line and generated a response in the text on the screen. I was as proud as a peacock.
Fast forward almost 40 years. Currently, it has never been easier to develop an application that lets you talk to your computer.
In this article, I’ll explain how to create an advanced Slack Bot in Node.js with Botkit, Botkit C.M.S., and L.U.I.S. …
About