Author: drweb

Large Language Models(LLMs) have been in the tech news for quite some time and every day, we learn about new advancements in this field. These models are being used in finance, management, content creation, and analysis. While these perform well by themselves, some additional advanced techniques can help increase the reliability and accuracy of LLM-based applications. One such framework is Retrieval Augmented Generation(RAG) which allows the language model to access a knowledge base, thereby increasing the quality of responses generated by llms. I have already covered a basic introduction to LLMs in the previous posts. In this one, I will…

Read More

import re text = “Contact us at [email protected] or [email protected]” pattern = r’\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b’ emails = re.findall(pattern, text) print(emails) # [‘[email protected]’, ‘[email protected]’] That code extracts email addresses from text using Python regex. The pattern looks cryptic at first, but each piece serves a specific purpose in matching the structure of an email address. Regular expressions give you a tiny language for describing text patterns, and Python’s re module makes them practical to use. Understanding Python regex syntax Python regex patterns combine ordinary characters with special metacharacters that represent broader matching rules. The character \d matches any digit…

Read More

Python​‍​‌‍​‍‌​‍​‌‍​‍‌ is probably a programming language that any discussion on data analysis would inevitably include. Besides, it is not only a data analysis tool that is gradually making its way into gaming environments. Python, whether in video games or gambling, opens the door for developers, analysts, and even enthusiasts to collect, organize, and analyze large amounts of performance data. Game performance and stats tracking used to be a domain of professionals only; however, with Python, even beginners can perform very advanced analyses. In this write up, we look at how Python can help track game performance, understand player behavior, and…

Read More

Press enter or click to view image in full sizeNOTE: I’m going to publish more and more YouTube videos this year. If interested, you can subscribe to my YouTube page.Angular 21.1 is available and offers many interesting features, but keep in mind that almost all of them are experimental at this point, meaning they’re not ready for production use.Signal Forms UpdatesSignal Forms are an experimental feature, and it shows in version 21.1, as there are two breaking API changes:The field directive was renamed to formFieldThe field property was renamed to fieldTreeThis means we have to use the form field directive…

Read More
SQL

I was listening to the radio the other day and the hosts were discussing the NFL playoffs in 2026. Someone mentioned the winningest coach was Nick Sirianni of the Philadelphia Eagles and no one wanted to face the Eagles. I was wondering if the first part of that was true. I used Claude and SQL Prompt AI to help.Note, I enjoyed watching the Eagles lose in the first round to the 48ers. As a lifelong Cowboys fan, that was great. However, I am impressed with Jalen Hurts and was glad to see him win last year.This is part of a…

Read More

# Create a set numbers = {1, 2, 3, 4, 5} empty_set = set() # Not {}, that’s a dictionary unique_items = set([1, 2, 2, 3, 3, 4]) # {1, 2, 3, 4} Sets are Python’s built-in data structure for storing unique, unordered collections. They automatically eliminate duplicates and provide fast membership testing. If you’ve ever needed to remove duplicate entries from a list or check whether something exists in a collection without iterating through every item, sets solve that problem. Creating and initializing Python sets You can create Python sets in three ways. The curly brace syntax works for…

Read More

Syntax: numpy.where(condition, x, y) Quick example: import numpy as np arr = np.array([1, 2, 3, 4, 5]) result = np.where(arr > 3, ‘big’, ‘small’) # Output: [‘small’ ‘small’ ‘small’ ‘big’ ‘big’] That’s Python np where in action. You give it a condition, tell it what to return when True, what to return when False, and it runs that logic across your entire array without loops.What Python np where actually doesThe numpy.where() method acts as a vectorized if-else statement for arrays. You’re essentially broadcasting a conditional operation across every element in your array simultaneously. This matters because it’s fast. Really fast.…

Read More