Elena' s AI Blog
  Browse by topic  · Browse by tag

Python Functions: Writing Reusable Code


Functions are the building blocks of reusable Python code. In this post we cover def, parameters, return values, default arguments, *args, **kwargs, type hints, and lambda — all with birds. Read more...

Python Error Handling: When Birds Misbehave


Things go wrong in every program. Python's exception system gives you the tools to handle errors gracefully, raise your own, and write code that fails helpfully rather than silently. Read more...

Cursor AI with MCP tools


A practical walkthrough for connecting Cursor AI to MCP servers so the assistant can use external tools, APIs, and project context safely. Read more...

Codex CLI Part 3: Practical Workflows for Blogging and Python Development


A practical, high-depth guide to using Codex CLI for blog editing and Python delivery: review loops, safe refactoring, debugging, and non-interactive automation with explicit guardrails. Read more...

My Multi-Agent Workflow


A structured guide to building a calm, dependable multi-agent publishing workflow: which AI tool operates at which layer, and how to wire them together without chaos. Read more...

Apache-Licensed Summarizers


Looking for summarisation models you can safely use in your app? Here is a definitive guide to Apache-licensed transformer models, complete with selection matrices and production gotchas. Read more...

LoRA fine-tuning wins


You no longer need to retrain entire language models. LoRA allows you to teach new capabilities via tiny adapters. Here is the architectural code, deployment cheat sheets, and production pitfalls. Read more...

Cursor AI for Python Development


Traditional AI chatbots require you to manually paste code snippets back and forth. Cursor AI fundamentally changes this dynamic by operating as an IDE built entirely around contextual AI agents. Here is my technical review of its RAG-based codebase indexing and Composer features for Python development. Read more...

On AI Coding Assistants


Not all LLMs write code the same way. After months of prototyping, debugging, and building architectures with Google Gemini, ChatGPT, and Claude AI, here is a technical breakdown of how they compare, and why the Model Context Protocol (MCP) changes everything. Read more...

Vibe coding with Generative AI


I've been getting into "vibe coding" recently, quickly prototyping some of my ideas, and working on my pet projects. I must confess that the AI-assisted coding is a very addictive activity, and must be taken with caution since it has some security implications and requires a careful prompts engineering. Read more...

Cross-Validation Techniques


Building a machine learning model is easy; proving it actually works on unseen data is the hard part. In this post, we cover cross-validation techniques—from traditional K-Fold to Stratified and Time-Series splits—using hands-on examples in scikit-learn. Read more...

Python Flask TODO App


Ready to build your first web application? In this tutorial, we will construct a fully functional TODO app using Python, Flask, and SQLite. You will learn how to route requests, manage a database, and render HTML templates. Read more...

DeepSeek R1 With Ollama


This post explores the use of Ollama, a state-of-the-art language modelling framework, in conjunction with pre-trained models such as DeepSeek R1. Read more...

Python Virtual Environments


If you are working on multiple Python projects, you will eventually run into a dependency nightmare. Virtual environments solve this by isolating packages per project. Here is my practical guide to creating, managing, and safely deleting Python virtual environments. Read more...

Logging in Python


In this post, I cover everything from the basics of logging to configuring logging to output messages to different destinations. I also included some examples of logging levels and how to log messages at different levels based on the severity of the issue. Read more...

Sending Emails with Python and receiving your messages


Running a static site on GitHub Pages means I don't have a backend to process forms or send newsletters. But that hasn't stopped me. Here is how I handle incoming messages, and how I use Python and Gmail to send automated emails. Read more...

How recommendation engines actually work (with Python code)


Ever wondered how Netflix or Spotify manages to guess what you want to watch or listen to next? The secret lies in recommendation algorithms. Here is a look at the math behind collaborative and content-based filtering, and how to implement them in Python. Read more...

Super-girls don't cry in face-swaps


I wanted to see myself flying over Niagara Falls as a superhero. Here is how I did it — InsightFace Bot, Midjourney, and a Python/OpenCV implementation with Haar cascades and seamless blending. Read more...

OpenAI's Model Show-off


OpenAI's GPT models are highly sophisticated machine learning models that are used in various fields such as natural language processing, coding assistance, and content creation. OpenAI's newest video-generating model, Sora, sets a new benchmark in video generation technology, which I quickly explore in this post. Read more...

What is Docker?


Docker lets you quickly deploy microservices, cloud-native architectures, or web apps. In this post, we will use Docker to create a reliable environment for Flask applications that efficiently manages dependencies and deployment intricacies. Read more...

Joking Flask App


Build a joke-serving web app with Flask from scratch. We cover routing, Jinja2 templates, static files, form handling, and how to avoid the classic "request is not defined" trap. Read more...

Cool Wallpaper with QR code for iPhone


When my iPhone is locked, I can share my website address with a QR code. How to use reportlab and Python to generate a QR code for the iPhone wallpaper? Read more...

Bias-Variance Challenge


In machine learning, we usually start from a simple baseline model and progressively adjust its complexity until we reach that spot with the best model performance. How can we do this? Let's detail the most essential machine learning concepts and the bias-variance challenge. Read more...

Decision Tree versus Random Forest, and Hyperparameter Optimisation


Decision trees, with their elegant simplicity and transparency, stand in stark contrast to the robust predictive power of Random Forest, an ensemble of trees. In this post, we compare the key distinctions, advantages, and trade-offs between these two approaches. We will use Scikit-Learn for training and testing both models and also perform hyperparameter optimisation to find both model parameters for improved performance. Read more...

Generate Music with AI


In this post, we will get into music generation with AI. We will briefly explore existing AI applications generating audio. We will explore transformer usage while coding music generation with HuggingFace transformers in Python. Read more...

Loop like a Pro with Python Iterators


This post explains the basics of Python iterators and their successful alternatives, such as list comprehension. While these alternatives use more memory, they are still useful in practice. The post also covers advanced techniques for working with iterators, including using the itertools module and creating generators with the yield keyword. By mastering iterators, readers can create elegant and efficient code and become better Python programmers. Read more...

Audio Signal Processing with Python's Librosa


In this post, I focus on audio signal processing and working with WAV files. I apply Python's Librosa library for extracting wave features commonly used in research and application tasks such as gender prediction, music genre prediction, and voice identification. To succeed in these complex tasks, we need a clear understanding of how WAV files can be analysed, which I cover in detail with handy Python code snippets. Read more...

Machine Learning Tests using the Titanic dataset


In this post, we created and evaluated several machine-learning models using the Titanic Dataset. We have compared the performance of the Logistic Regression, Decision Tree and Random Forest from Python's library scikit-learn and a Neural Network created with TensorFlow. The Random Forest Performed the best! Read more...

Data exploration and analysis with Python Pandas


In Data Science, we have so many terms explaining concepts and techniques that it is easy to need clarification and get a clear understanding of all data science components and steps. In this post, I filled the gap by explaining data science's two essential components, data analysis and exploration. To clarify things, I have shown both approaches, compared them, and provided Python code using Pandas dataframe and graph drawing. Read more...

Python coding with chatGPT


In this post, I did some Python coding with chatGPT. We have coded a neuron, a simple neural network, and learned how to train it. I am pleased with the result. I think that chatGPT has excellent potential for CS students and all coders that want to update their skills effectively. Is it an end of the StackOverflow? We cannot see the feature. However, we still need social interaction with humans, and AI cannot substitute human communication. Read more...

Git Commands and a Contribution Workflow


I have created a list of arguably the most useful Git commands and an example contribution workflow. I have also found a great JavaScript application for learning Git branching! Read more...

Linters and Git Pre-commit


It's great to focus on code development while keeping the coding style right. This could be achieved with automatic formatting checks before committing files into the code repository. In this post, I have described the pre-commit usage with git hooks and a simple setup for checking Python files. Read more...

Python classes and pigeons


Happy 1st of September, dear visitors. I have decided to write a letter to you. The letter concerns pigeons and Python classes, the essential OOP concepts such as inheritance, polymorphism, and encapsulation. Read more...

TensorFlow: Romancing with TensorFlow and NLP


In this post we will create a simple poem generation model with Keras Sequential API. Read more...

TensorFlow: Evaluating the Saved Bird Species Prediction Model


In this post, I have described the process of in-depth model evaluation. I have reused the previously created EffecientNetB0 model, which is fine-tuned with the 400 Bird Species Kaggle dataset. As a result, I have found out which bird species are not well predicted. Read more...

TensorFlow: Transfer Learning (Fine-Tuning) in Image Classification


We used a 400 species birds dataset for building bird species predictive models based on EffeicientNetB0 from Keras. The baseline model showed already an excellent Accuracy=0.9845. However, data augmentation did not help in improving accuracy, which slightly lowered to 0.9690. Further, this model with a data augmentation layer was partially unfrozen, retrained with a lower learning rate, and reached an Accuracy=0.9850. Read more...

TensorFlow: Transfer Learning (Feature Extraction) in Image Classification


Image classification is a complex task. However, we can approach the problem while reusing state-of-the-art pre-trained models. Using previously learned patterns from other models is named "Transfer Learning." This way, we can efficiently apply well-tested models, potentially leading to excellent performance. Read more...

TensorFlow: Convolutional Neural Networks for Image Classification


In this post, I have demonstrated CNN usage for birds recognition using TensorFlow and Kaggle 400 birds species dataset. We observed how the model works with the original and augmented images. Read more...

TensorFlow: Evaluating the Regression Model


In this post, we have performed the evaluation of four regression models using TensorFlow. MAE and MSE error metrics were used to compare the Sequential models while finding the best neural network architecture regarding the defined hyperparameters. Read more...

TensorFlow: Regression Model


I have described regression modeling in TensorFlow. We have predicted a numerical value and adjusted hyperparameters to better model performance with a simple neural network. We generated a dataset, demonstrated a simple data split into training and testing sets, visualised our data and the created neural network, evaluated our model using a testing dataset. Read more...

TensorFlow: Global and Operation-level Seeds


In training Machine Learning models, we want to avoid any ordering biases in the data. In some cases, such as in Cross-Validation experiments, it is essential to mix data and ensure that the order of data is the same between different runs or system restarts. We can use operation-level and global seeds to achieve the reproducibility of results. Read more...

Tensors in TensorFlow


TensorFlow is a free OS library for machine learning created by Google Brain. Tensorflow has excellent functionality for building deep neural networks. I have chosen TensorFlow because it is pretty robust, efficient, and can be used with Python. In this post, I am going to write about how we can create tensors, shuffle them, index them, get information about tensors with simple examples. Read more...

Artificial Neural Networks


Artificial neural networks (ANNs) are the cornerstone of Deep Learning algorithms. The name and the architecture are adopted from the human brain's neural network. ANNs are designed to simulate human reasoning based on how neurons communicate. ANNs contain a set of artificial neurons connected. Read more...

Python Programming Language


Python is relatively easy to learn and beginner-friendly. I like Python because you can program any kind of project with it. It is open-source and free for anyone to use. Python has well-tested machine learning libraries and a very supportive community. I will overview herein a basic syntax of the Python programming language. This will be useful for beginners or people who move quickly from another programming language to Python. Read more...

Tools and Data to Experiment with Machine Learning


Python open-source library scikit-learn provides a comprehensive selection of machine learning techniques (regression, classification, clustering), feature selection, metrics, preprocessing, and other functionality. At this moment, Scikit-learn, is lacking deep learning functionality; however, we can use TensorFlow with the Scikit Flow wrapper for creating neural networks using the Scikit-learn approach. Read more...

1 2 3 4 5