Programming is Not Rocket Science, Don't let AI Write Your Code, Fight Back. And if you must use AI, find provenance, and Attribute. Long Live GNU/Linux. Full praise to SSA-Based Compilation.
Tuesday, 23 December 2025
Useful Little Numpy Functions like linspace
numpy.linspace creates an array (ndarray) of evenly spaced numbers between a start and stop value.
numpy.zeros returns a new array of given shape and type, filled with zeros.
Tuesday, 16 December 2025
Microsoft Copilot Outage due to Azure Configuration Error
This has affected the UK and Europe region.
Saturday, 13 December 2025
Risk Managing WSL
If you are manager of desktops and need to understand WSL risks, here is a summary.
WSL allows users root access inside their Linux instance with ability to install a host of useful software including compilers, packages etc. Linux binaries may be run which Windows Defender may not fully inspect.
However, users have no admin rights on Windows itself.
There are a number of risks which include unmonitored code execution and running unvetted network services as well as bringing unmanaged Linux tooling into the Windows estate.
It can be managed, but adds an additional complexity layer.
batcat - a syntax highlighting version of cat
To install in ubuntu use:
sudo apt install bat
Then batcat the file you want to display.
If you want to look at the package in more detail, you can type:
apt show bat (don't need sudo for this)
You will see this is a Rust compiled file.
Friday, 12 December 2025
LLVM for Noobs - Why SSA is Powerful
LLVM is a collection of modular and reusable compiler and toolchain technologies.
It tackles compilation as an abstract problem and uses modern, SSA-based strategies.
SSA = static single assignment, an intermediate language format where each variable is assigned only once. This simplification enables aggressive optimization - hence makes the technique powerful.
Get Python SHAP Explainer in Ubuntu
pip install shap
is what you need.
It has dependencies on:
- numba
- scikit-learn
scikit-learn is the de facto Python machine learning kit. Everyone knows scikit-learn! But knowing it well - ah that's the rub!
You may see llvmlite downloaded too as part of shap, to support Numba.
Labels:
llvm,
machinecode,
machinelearning,
Python,
scikit-learn,
XAI
Thursday, 11 December 2025
Wednesday, 10 December 2025
Solve Simple ODEs in Python
The scipy library can be used easily for this purpose.
from scipy.integrate import solve_ivp
Imports the solve_ivp function for solving initial value problems.
Note that solve_ivp can be used for scalar ODEs or vector ODEs (such as the Lotka-Volterra system).
Tuesday, 9 December 2025
Sunday, 7 December 2025
AI Attribution
"The user is interested in context".
Thus begins the AI analyser as it looks for the provenance of the code it has expertly suggested. When provenance is found, attribution must follow.
SageMath versus Python
SageMath is actually built on top of Python, and many Python code snippets will actually work in SageMath. However, the former lets you to do more mathematical stuff straight off the bat, like factor a massive integer into prime factors in one line. Try that, Python!
A More Technical Take on Logits
Mathematically, the logit is the inverse of the standard logistic function.
sigma(x) = 1 / (1+ exp(-x))
Note that the standard logistic function has only positive signs in it, the only hint of anything negative is the presence of the negative exponentation.
Hence logit is equal to
sigma^(-1)(p) = ln (p/ (1-p)) for p in (0,1).
Due to this, we sometimes call logit as log-odds, since it is the logarithm of the odds function p/(1-p) where p is probability.
However, this definition is like getting the answer to something where you don't know the question.
Saturday, 6 December 2025
Logits in TensorFlow
Logits refer to the vector of (non-normalized) predictions that a classification model generates, which is then normally passed to a normalization function.
See also this course.
Labels:
classification,
logits,
machinelearning,
TensorFlow
Friday, 5 December 2025
Relationship between TensorFlow and oneDNN
oneDNN is used by TensorFlow for performance acceleration. It was a library developed for Intel acceleration initially but now broadened to other architectures.
When you import TensorFlow in Python you may see the message: "oneDNN custom operations are on".
Labels:
AI,
neuralnetworks,
oneDNN,
TensorFlow,
uxlfoundation
Monday, 1 December 2025
IaC Zoology
Infrastructure-as-Code has had its fair share of tech standards. Let's look at them.
- Terraform - multi-cloud, open-source Infrastructure-as-Code tool that works across AWS, Azure, GCP and more
For Microsoft landscape only, we have:
- ARM templates - Azure's native JSON-based IaC format, verbose but powerful. Many companies still have ARM templates in their arsenal, even though it's time has come
- Bicep - domain-specific language (DSL) for Azure (where said domain is IaC, or more broadly "declarative deployment of Azure resources") that simplifies ARM templates with cleaner syntax. A good one if you are not hybrid-clouding
Subscribe to:
Comments (Atom)