Skip to main content

5 posts tagged with "Basic Series"

A series of basic tutorials for your research

View All Tags

Basic Series 5 - Configuration with Tyro

· 5 min read
warning

Code Style Note: The demonstration code examples in this post are intentionally compact for readability. In production code, you should follow PEP 8 style guidelines with proper spacing, line breaks, and formatting.

Why Use Configuration Tools Anyway?

  • Single source of truth: No more copy-pasting option definitions across your code, CLI parser, and docs.
  • Less boilerplate: Automatically handle parsing, defaults, validation, and help text without endless manual work.

Why Tyro?

  • Pure Python: Just use type hints and dataclasses — no extra weird config files or DSLs to learn.
  • One-liner CLI: tyro.cli(...) magically figures out flags, defaults, help messages, and even subcommands for you.
  • Better developer experience: You get IDE autocomplete, type checking, and neat, hierarchical interfaces. (Honestly, this is my favorite part!)

Basic Series 4 - Mastering tmux for Efficient Terminal Management

· 5 min read

This guide explains how to use tmux (Terminal Multiplexer) to enhance your terminal productivity and manage multiple terminal sessions effectively.

What is tmux?

tmux is a terminal multiplexer that allows you to:

  • Create multiple terminal sessions within a single window
  • Detach from sessions without closing them
  • Reattach to sessions from different terminals
  • Split your terminal into multiple panes
  • Share terminal sessions with other users

Basic Series 3 - Python Code Formatting with Black and isort

· 5 min read

This guide shows you how to automatically format your Python code using Black and isort, so your project stays clean, consistent, and easy to read (even at 3 a.m. after too much coffee).

What Are Black and isort?

  • Black: An opinionated Python code formatter that auto-formats your code to follow PEP 8 style (so you can stop arguing about whitespace with your teammates).
  • isort: Automatically sorts and organizes your imports into neat, logical sections.

Basic Series 2 - Using uv for Python Package Management

· 4 min read
note

This post may be updated as better alternatives to uv emerge.

uv is a super-fast Python package installer and resolver, built in Rust. Think of it as a modern, turbocharged alternative to pip and other Python package managers.

Key Features

  • Speed: uv is blazing fast compared to traditional tools.
  • Automatic Python Management: It can handle downloading and managing Python versions for you.
  • Compatibility: Works nicely with existing Python installs.
  • Modern CLI: Clean, intuitive commands that are easy to remember.

Basic Series 1 - Uploading Code to a GitHub Repository

· 4 min read

This guide will show you how to push your local code to a private GitHub repository step by step — no stress, no cryptic errors (hopefully).

Prerequisites

Before we jump in, make sure you have:

  • Git installed on your computer
  • A GitHub account
  • An SSH key set up (recommended) or a Personal Access Token