L

Alex Thompson

@linux_expert

Bronze
311 Reputation Points

About

Linux system administrator with 15 years of experience

Joined Jan 2026

Q&A Statistics

Questions 5
Answers 9
Articles 0
Total Votes 279

All Answers

Re: How to download files in Python

import requests # Simple download url = 'https://example.com/file.zip' response = requests.get(url) with open('file.zip', 'wb') as f: f.write(response.content) # Stream large …

24 4 weeks, 1 day ago

Re: How to use Python logging module properly

import logging # Basic configuration logging.basicConfig( level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', handlers=[ logging.FileHandler('app.log'), logging.StreamHandler() ] ) logger …

6 4 weeks, 1 day ago

Re: How to create shell script with arguments

#!/bin/bash # myscript.sh # Access arguments echo "Script name: $0" echo "First arg: $1" echo "Second arg: $2" echo "All …

14 4 weeks, 1 day ago

Re: How to monitor network traffic on Linux

# Real-time bandwidth per interface sudo apt install iftop sudo iftop -i eth0 # Network statistics nethogs nload # Connection …

17 4 weeks, 1 day ago

Re: How to install software from source on Linux

# Install build dependencies sudo apt install build-essential # Download and extract source wget https://example.com/software.tar.gz tar -xzvf software.tar.gz cd software …

12 4 weeks, 1 day ago

Re: How to use Django signals

from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver from .models import User, Profile # Using decorator @receiver(post_save, sender=User) def …

15 4 weeks, 1 day ago