Visualizing Network Topologies

Posted on Sat 19 April 2025 in network, topology, visualization, javascript, vibe coding • Tagged with network, topology, visualization, javascript, vibe coding

While preparing my classes on interconnection networks in computer systems, I wanted to better understand metrics related to ring topologies. To explore this, I created a simple JavaScript program to visualize a ring network, using “vibe coding”—an approach where you let Artificial Intelligence (AI) generate the code for you. The result is this Ring Network Visualization (GitHub repository).

Later, I came across several impressive visualizations built with Three.js (like this and this), and I wanted to give it a try. Using the same “vibe coding” approach, I developed this Topology Visualizer (GitHub repository). It’s a simple tool that allows you to visualize different network topologies—such as ring, mesh, and hypercube—in 3D. You can change the number of nodes and observe how the topology evolves. Clicking on a node triggers a visual effect that shows light bolts connecting it to the farthest node, effectively highlighting the diameter of the topology.

Topology Visualizer Screenshot


Updating to uv from pip

Posted on Fri 11 April 2025 in uv, pip, python • Tagged with uv, pip, python

This is a short guide on how to upgrade a project from using pip with a requirements.txt file to using Astral's uv. It assumes that uv is already installed and that you have a project set up with a requirements.txt file.

Initialize uv:

uv init

Remove hello.py.

rm hello.py

Modify project.toml to update the information about the project.

Add the dependencies from requirements.txt to the project.toml file:

uv add -r requirements.txt

That's it! You can now use uv to manage your dependencies. You can run the project with:

uv run your_script.py

Alternatively, you can use uv sync to manually update the environment then activate it before executing a command:

uv sync
source .venv/bin/activate
python your_script.py

To add new dependencies, you can use the uv add command:

uv add package_name

To upgrade a package, you can use the uv upgrade command:

uv lock --upgrade-package package_name

Connecting to a Jetson Nano with Ubuntu 18.04 Using VS Code

Posted on Fri 28 March 2025 in nano, ubuntu, vscode • Tagged with nano, ubuntu, vscode

If you're trying to connect remotely to an NVIDIA Jetson Nano running Ubuntu 18.04 with Visual Studio Code (VS Code), you might run into a compatibility issue due to recent changes in VS Code's remote server requirements.

Starting from release 1.99 (March 2025), VS Code’s prebuilt remote server is only compatible with Linux distributions using glibc 2.28 or later. However, Ubuntu 18.04 ships with glibc 2.27, making it incompatible with these newer releases.

Solution: Use an Older Version of VS Code (1.98.2)

To work around this limitation, you can use VS Code 1.98.2, which is the last version compatible with Ubuntu 18.04. Here’s how to do it:

1. Download VS Code 1.98.2 (Portable Version)

Since later versions may not work, download the portable version of VS Code 1.98.2 for your platform:

  • Windows (Portable): Download here
  • Other platforms: Follow the instructions in the VS Code FAQ to find the appropriate link.

2. Extract and Run VS Code

If you downloaded …


Continue reading

Using uv to run Python tools without installing them

Posted on Thu 23 January 2025 in python, uv • Tagged with python, uv

I wanted to run a Python tool without installing it, or preparing a virtual environment and all that. This is now very easy with uv, using uvx.

I wanted to run markitdown, a tool to convert various files to Markdown. I didn't want to install it, so I used uvx:

uvx markitdown "file_to_convert.docx" > output_file.md

It downloads the tool and installs it in a temporary, isolated environment.

A tool can be installed with uv tool install, like this:

uv tool install markitdown

It's very convenient.


Essential git cheat sheet for loners

Posted on Wed 22 January 2025 in git • Tagged with git

This are the basic commands to operate with git as a loner: no branches, no remotes, no merges... Just the basic stuff.

The minimum concepts you need to know are:

  • Git is a version control system. It allows you to store changes in your files. Don't mix it with GitHub, which is a platform to store your repositories.
  • Working directory: the directory where you are working.
  • Staging area: a place to store changes before committing them.
  • Repository: the place where the changes are stored.
  • Commit: a set of changes stored in the repository. They are identified by a hash. For example, commit 1234567.

The basic workflow is:

  1. Make changes in the working directory.
  2. Add changes to the staging area.
  3. Commit changes to the repository.
  4. Repeat.

Conceptually: working directory -> staging area -> repository.

Configuration

git config --global user.name "Your Name"
git config --global user.email "your_email@example.com"

Create a new repository

In the directory of your project:

git init

Add files to the repository

This adds all the changes in your current directory to the …


Continue reading