Blog

Notes on software development, machine learning, and engineering.

23 min read

Advanced Asyncio Topics: Beyond the Basics

Introduction Hello, asyncio enthusiasts! If you've been following along, you'll remember that we recently dived into the basics of Python's asyncio library in our previous blog post. We explored the f…

asynchronous-programmingpython
12 min read

'asyncio' tutorial for the programmer in a hurry

Introduction In the evolving world of Python programming, understanding the asyncio library is becoming increasingly important. asyncio allows for asynchronous, concurrent, and parallel programming in…

asynchronous-programmingprogrammingpython
15 min read

Transformers: how do they work internally?

Table of Contents Introduction Input Embedding Positional Encoding (PE) The Encoder Self-attention Mecanism Multi-head attention mechanism Feedforward Network The Decoder Masked Multi-head Attention M…

machine-learningpythontransformers
8 min read

Python Profiling - Memory Profiling (Part 3, Final)

Table of Contents memory_profilerPySpyDISassemblingFinal Recommendations memory_profiler Similar to line_profiler, memory_profiler provides detailed memory usage measurements, with the aim of efficien…

profilingpython
10 min read

Python Profiling - cProfile and line_profiler Tools (Part 2)

Table of Contents cProfileSnakeViz, for cProfile insightsLine-by-line ProfilingAbout @profile decoratorOther useful toolsgprof2dotPyinstrumentConclusionAppendixInstall with pip or conda cProfile The P…

profilingpython
5 min read

Python Profiling - Time Profiling (Part 1)

Table of Contents IntroductionTime Profiling Toolsfunctools.wrapstimeit moduletime / gtimeConclusion Introduction Many times, the code we write requires optimizations, and profiling helps us find the …

profilingpython
3 min read

JavaScript Levenshtein Algorithm Implementation

One of the most known algorithms used by spell checkers and auto-complete fields is perhaps the Levenshtein algorithm, which basically minimizes the Levenshtein distance between the target word and th…

javascriptlevenshtein
12 min read

Support Vector Machines (SVM) for Classification

The purpose of this document is to present the linear classification algorithm SVM. The development of this concept has been based on previous ideas that have supported the development of SVM as an al…

matlabmlsvm
1 min read

DDD Clean Architecture Template

(GitHub Repo: https://github.com/alulema/DDD-CleanArchitectureTemplate) These last 10 months I’ve been delighted working with ASP.NET Core, considering the improvements made by Microsoft to this frame…

c#cqrsddddesign-patternsmediator
3 min read

C# Sudoku Solver

(GitHub Repo: https://github.com/alulema/SudokuSolverNet) I was revisiting a couple of basic AI concepts:  Depth First Search and Constraint Propagation, and I found a very good explanation …

aic#constraint-propagationdepth-first-search
2 min read

TensorFlow High-Level Libraries: TF Estimator

TensorFlow has several high-level libraries allowing us to reduce time modeling all with core code. TF Estimator makes it simple to create and train models for training, evaluating, predicting and exp…

machine-learningpythontensorflow
3 min read

TensorFlow Way for Linear Regression

In my two previous posts, we saw how we can perform Linear Regression using TensorFlow, but I’ve used Linear Least Squares Regression and Cholesky Decomposition, both them use matrices to resolve regr…

linear-regressionmachine-learningpythontensorflow
4 min read

Cholesky Decomposition for Linear Regression with TensorFlow

beenhereUpdate 10.2023This entry has been updated with versions TensorFlow 2.12.1 and PyTorch 2.0.1 Several years have already passed since the onset of the Deep Learning boom. I have witnessed impres…

choleskylinear-regressionmachine-learningpythonpytorchtensorflow
2 min read

Linear Least Squares Regression with TensorFlow

Linear Least Squares Regression is by far the most widely used regression method, and it is suitable for most cases when data behavior is linear. By definition, a line is defined by the following equa…

linear-regressionmachine-learningpythontensorflow
2 min read

Classification Loss Functions (Part II)

In my previous post, I mentioned 3 loss functions, which are mostly intended to be used in Regression models. This time, I’m going to talk about Classification Loss Functions, which are going to be us…

machine-learningpythontensorflow
4 min read

Loss Functions (Part 1)

Implementing Loss Functions is very important to machine learning algorithms because we can measure the error from the predicted outputs to the target values. Algorithms get optimized by evaluating ou…

machine-learningpythontensorflow
13 min read

Activation Functions (updated)

beenhereUpdate 09.2022This entry has been updated to TensorFlow v2.10.0 and PyTorch 1.12.1 Table of Contents What is an activation function?Activation FunctionsSigmoidReLU (Rectified Linear Unit)ReLU6…

machine-learningpythontensorflow
3 min read

Working with Matrices in TensorFlow

Matrices are the basic elements we use to interchange data through computational graphs. In general terms, a tensor can de defined as a matrix, so you can refer to Declaring tensors in TensorFlow in o…

machine-learningpythontensorflow
2 min read

Understanding Variables and Placeholders in TensorFlow

Usually, when we start using TensorFlow, it’s very common to think that defining variables is just as trivial as a HelloWorld program, but understanding how variables (and placeholders) work under the…

machine-learningpythontensorflow
4 min read

Declaring tensors in TensorFlow

[Requirement: Tensorflow and NumPy installed on Python +3.5][Requirement: import tensorflow as tf][Requirement: import numpy as np] Tensors are the primary data structure we use in TensorFlow, and, as…

machine-learningpythontensorflow
5 min read

Java Streams API in brief

First, let’s define what a stream is in Java 8: a sequence of functions, actions, inputs, and outputs (better defined as a “pipeline”). Streams API provides functional-style operations to transform th…

data-engineeringjava
6 min read

Does it worth to work as a freelancer?

BACKGROUND Usually many of us graduates from college have dreamed of working in a large company with great salary, prestige and traveling around the world; or maybe we’ve had the “million-dollar idea”…

lifestyle
1 min read

Cross-Platform Communications: gRPC Server and Client: Node.js

This is my second video on gRPC, this time I was experiencing Node.js to make an app communicate with a gRPC .NET Core app. Here the details about Node.js implementation: https://youtu.be/3wa0bs_Jw6M…

grpcjavascriptvscode
1 min read

Installing Redis on Azure Ubuntu VM

In one of my latest developments I needed to have a local Redis for caching requirements. I feel comfortable on terminal/command line, so it wasn’t hard to have an Ubuntu VM on VirtualBox, and it is v…

redisubuntu
1 min read

ASP.NET Core Basics – Part 2

Now, we continue with the series ASP.NET Core Basics. At this time we are been focused in MVC specific topics, which will be covered in a 7 mins video. Contents: MVC. ControllersMVC. Models …

c#dotnetvscode
1 min read

Installing SQL Server for Linux on Docker Container

It is very common requiring MS SqlServer if you are developing ASP.NET web applications; because of this, having a local Sql Server is a great plus if you are developing web apps on ASP.NET Core on Ma…

macosxsqlservervscode
1 min read

ASP.NET Core Basics – Part 1

I’m starting this blog with a series of videos focused on ASP.NET Core. This tutorial has been completely developed on C# + Visual Studio Code + Mac OSX, but (almost) all commands and concepts are ful…

c#dotnetvscode