A while ago I published the article Learn these 9 rules to start writing clean code immediately and one of the rules in that article is:
“Don’t use the else keyword”
This is at first glance a very hard rule to follow, such that many people think it is just “silly” or even impossible, in the context of that article, this is a rule to follow just during the “exercise”, and not all the time while coding in real life.
The “else” keyword or “if-else” is there for a reason and is a programming language feature and it is a…
Now that you got Numpy up and running let's continue learning the basics.
Creating an array with a range of numbers
In : array = np.arange(10, dtype=np.int64)
In : array
Out: array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
Basic array attributes
We can easily check the data type of the numpy array with .dtype and the shape with .shape
In : array.dtype
In : array.shape
Notice that the shape prints out as (10,) that…
I’m talking about Object Calisthenics, and if you have not heard about it, then you should definitely learn this!
During the years I had the opportunity to present this to many developers, and the reactions are always the same, first people think is a joke and they even say: “How am I supposed to write any code with these rules!”, but after trying it out most of them will agree that in fact, you can write cleaner code almost instantly if you apply the rules!
So what is it?
Jeff Bay, originally coined the term Object Calisthenics in The ThoughtWorks…
If you want to get into the AI world, either as a Data Scientist, Natural Language Processing Engineer, or Computer Vision Engineer, you need to know how to use Numpy.
Numpy stands for Numerical Python and is a Python library used for scientific computing. It provides multidimensional array objects and very fast parallel operations on top of them which is why it is widely used.
Numpy can perform mathematical, logical, and other operations very fast, like 50x faster than Python itself, and this is a huge advantage, as when dealing with anything AI-related we are at the core operating with…
With technology becoming part of our daily lives more and more every day, a lot of people is switching careers to become a software developer, here are some things you should know if you are thinking on becoming one.
You will have to stay up to date
Technology is like medicine in terms that it keeps advancing every day and at a very fast pace!
This means that finishing your studies and becoming a developer is just the first step, you will need to catch up with new technologies quite often, if you stay inside of your comfort zone for…
Are you thinking of becoming a private pilot?
I did as well, several years ago I discovered my passion for aviation, and for some years I was undecided if to get a pilot license or not, some of these points helped me out decide, while others I learned about later.
1. The Private Pilot License (PPL) is the first step to become a commercial pilot
Every commercial pilot had to get the Private Pilot License first, so if you want to become a commercial pilot, you will have to get this license first to, later on, be able to upgrade…
A great project to do when learning computer vision is to do a Green Screen, and in fact is one of the first projects I give my students to work on, and by the way, I’m still waiting for some students to deliver this project.
This is the typical screen used when recording scenes, where the background is completely green, and because of that it can be post-processed later to change the background and place anything in there.
Of course, this can also be done in real-time, like for example when you see the weather report on TV, the…
Flask 2.0 was released recently, and got a lot of great improvements, but as you should already know with new versions also come things that become obsolete and deprecated.
If you were managing your dev instance of flask with Flask-Script + Flask Migrate in a nice manage.py file where you had all of your commands such as run, test, coverage and db upgrade, db migrate then you will run into some issues when upgrading.
Step one: Cleaning it up
Flask script is no longer supported so you will not longer be able to do this:
from flask_script import Manager
Setting up and testing the OpenCV AI KIT OAK-D Camera
What is the OAK-D camera?
It is basically a stereo camera able to detect depth in images, at the same time that it can run Neural Networks which does run in the camera itself so it does not load the host.
According to the official OpenCV store:
OAK — D is a spatial AI powerhouse, capable of simultaneously running advanced neural networks while providing depth from two stereo cameras and color information from a single 4K camera in the center.
Where can you buy it?