Gavin Wiggins

Notes

This page contains my notes on various programming and tech related topics. Subscribe to the JSON feed or RSS feed, or follow me on Mastodon to get notified about new posts. Use the buttons to filter the notes by tag.

Limit Concurrent Requests with a Python Semaphore

Use a Python asyncio semaphore to limit concurrent requests in a FastAPI app.

Git Commands

Some helpful commands for using Git in the terminal.

LazyVim Configuration

My configuration settings for the LazyVim terminal editor.

Ghostty Configuration

My configuration settings for the awesome Ghostty terminal.

Server Setup for a Python Quart App

Tools and configuration settings for deploying a Python app on a Hetzner cloud server.

Tmux Commands

Some useful commands for using the tmux terminal multiplexer.

Reverse Proxy and Basic Auth with Caddy

Setup reverse proxy and basic HTTP authentication with Caddy.

Initialize a Server with cloud-init

Initialize server networking and other settings with cloud-init.

macOS Terminal Commands

Useful commands in the macOS terminal.

Streamlit CLI in a Python Package

Use the Streamlit cli module to invoke the app within a Python package.

Suppress Print Output in Swift

Suppressing print output in Swift is useful for functions that accept a block of code as input.

Command-line Arguments with Python

The argparse module in Python provides an interface for command-line programs.

Makefiles for Python Projects

Use a makefile to run tests, format code, or publish a package in a Python project.

Cache Results from a Python Function

Use the Python cache decorator to store results from an expensive function.

Get the Version Number of a Python Package

Use the metadata library in Python to get a package's version number.

Two-Dimensional Array in C++

A two-dimensional array in C++ using C-style array and standard array container.

Plotly Graphs in JavaScript

Examples of the Plotly graphing library in JavaScript.

JavaScript Modules

The content of a module can be accessed from other JavaScript files.

Sorted List of Items with Python

Sorting a list of dictionaries or tuples in Python.

Use CMake to Build and Install a C++ Project

Commands for using CMake to build and install a C++ project for global access.

Strings in Python

Examples of working with strings in Python.

Counter in Python

Use the Counter class in Python to count items in a list or hashable object.

Lists in Python

Examples of working with Python lists.

Secrets in Python

Use the Python secrets module to generate cryptographically strong random passwords.

Boolean Indexing with NumPy

Assign values in a NumPy array based on a boolean condition.

Clip Array Values with NumPy

Limit values in an array using the NumPy clip function.

Arrays in Julia

Examples of working with arrays in Julia.

Modules for Julia Code

Modules organize code that can be used elsewhere in a program.