The Milky Way galaxy contains between 100 and 400 billion stars, spread across a disk roughly 100,000 light-years in diameter. Our solar system sits about 26,000 light-years from the galactic centre.

Black holes form when massive stars collapse under their own gravity at the end of their life cycle. The event horizon marks the boundary beyond which nothing, not even light, can escape.

The James Webb Space Telescope observes the universe in infrared light, allowing it to peer through dust clouds and see some of the earliest galaxies formed after the Big Bang.

Neutron stars are the remnants of supernova explosions. They pack more mass than the Sun into a sphere roughly 20 kilometres across, making them the densest objects observable in the universe.

Dark matter makes up approximately 27 percent of the universe's total mass-energy content. It does not emit, absorb, or reflect light, making it detectable only through its gravitational effects.

The cosmic microwave background radiation is the thermal remnant of the Big Bang, emitted approximately 380,000 years after the universe began when electrons and protons combined to form neutral hydrogen.

Jupiter's Great Red Spot is a giant storm that has persisted for over 350 years. It is wide enough to contain two to three Earths and winds within it reach speeds of up to 640 kilometres per hour.

The Drake Equation estimates the number of active communicating civilisations in the Milky Way by multiplying factors including stellar formation rates, fraction of stars with planets, and probability of intelligent life.

Pulsars are rapidly rotating neutron stars that emit beams of electromagnetic radiation. They are so precise in their rotation that they rival atomic clocks in timekeeping accuracy.

The Hubble constant measures the rate of expansion of the universe. Current measurements place it at approximately 70 kilometres per second per megaparsec, though tension between different measurement methods remains unresolved.

DNA replication is a semiconservative process where each strand of the double helix serves as a template for a new complementary strand. DNA polymerase adds nucleotides in the 5 prime to 3 prime direction.

Mitochondria are membrane-bound organelles that generate most of the cell's supply of ATP through oxidative phosphorylation. They contain their own circular DNA, evidence of their ancient bacterial origin.

CRISPR-Cas9 is a molecular tool that allows precise editing of DNA sequences. It uses a guide RNA to direct the Cas9 endonuclease to a specific location in the genome where it makes a double-strand break.

Neurons communicate via electrochemical signals called action potentials. When a neuron fires, sodium ions rush into the cell through voltage-gated channels, reversing the membrane potential from negative to positive.

Photosynthesis in plants occurs in two stages: the light-dependent reactions in the thylakoid membranes capture solar energy to produce ATP and NADPH, while the Calvin cycle in the stroma fixes carbon dioxide into glucose.

Viruses are not considered living organisms because they cannot reproduce independently. They hijack the machinery of host cells to replicate, inserting their genetic material and redirecting cellular resources.

The human immune system has two major branches: the innate immune system provides a rapid non-specific defence, while the adaptive immune system develops specific antibodies against particular pathogens.

Epigenetics studies heritable changes in gene expression that do not involve changes to the DNA sequence itself. Methylation of cytosine bases and modification of histone proteins are key epigenetic mechanisms.

Evolution by natural selection requires variation in traits, heritability of those traits, and differential reproductive success. Over many generations this leads to populations better adapted to their environment.

The human gut microbiome contains trillions of bacteria, fungi, and viruses. It plays a critical role in digestion, immunity, and has been linked to mental health through the gut-brain axis.

Transformer neural networks use self-attention mechanisms to weigh the importance of different tokens in a sequence when producing representations. This allows them to capture long-range dependencies efficiently.

Quantum computing leverages quantum mechanical phenomena such as superposition and entanglement to perform certain computations exponentially faster than classical computers.

The RSA cryptographic algorithm relies on the difficulty of factoring large composite numbers. A public key is used to encrypt messages while only the holder of the private key can decrypt them.

Gradient descent is an optimisation algorithm used to minimise a loss function by iteratively adjusting parameters in the direction of steepest descent, determined by the negative gradient.

Database indexing structures like B-trees maintain sorted data in a balanced tree format, enabling search, insertion, and deletion operations in O(log n) time regardless of dataset size.

Containerisation using Docker packages applications and their dependencies into isolated containers that can run consistently across different computing environments.

The CAP theorem states that a distributed data store cannot simultaneously guarantee consistency, availability, and partition tolerance. In the presence of a network partition, a trade-off must be made.

Convolutional neural networks use learnable filters that slide across input images to detect spatial features. Pooling layers reduce spatial dimensions while retaining the most important activations.

Graph neural networks operate on graph-structured data by iteratively aggregating information from neighbouring nodes. They are used in social network analysis, molecular property prediction, and recommendation systems.

Zero-knowledge proofs allow one party to prove to another that a statement is true without revealing any information beyond the validity of the statement itself.

mRNA vaccines encode instructions for cells to produce a harmless piece of a pathogen, training the immune system to recognise and fight it. Unlike traditional vaccines they do not use live or inactivated virus.

Alzheimer's disease is characterised by the accumulation of amyloid beta plaques and tau protein tangles in the brain, leading to progressive neurodegeneration and cognitive decline.

CRISPR gene therapy has shown promise in treating sickle cell disease by editing the patient's own stem cells to produce functional haemoglobin, effectively curing the condition in clinical trials.

Antibiotic resistance occurs when bacteria evolve mechanisms to survive exposure to drugs designed to kill them. Overuse and misuse of antibiotics accelerates this process, threatening modern medicine.

The blood-brain barrier is a selective semipermeable membrane that separates circulating blood from the brain. It protects the brain from pathogens and toxins but also limits drug delivery to the central nervous system.

CAR-T cell therapy engineers a patient's own T cells to express chimeric antigen receptors targeting cancer cells. It has achieved remarkable remission rates in certain blood cancers.

Type 2 diabetes involves insulin resistance where cells fail to respond effectively to insulin. It is strongly associated with obesity, physical inactivity, and is managed through diet, exercise, and medication.

The placebo effect demonstrates that belief in a treatment can produce measurable physiological changes. It is a key consideration in clinical trial design, necessitating blinded and placebo-controlled studies.

Organ transplantation requires immunosuppressive therapy to prevent rejection. The immune system recognises donor tissue as foreign and attacks it unless suppressed by drugs like tacrolimus and cyclosporine.

Personalised medicine tailors treatment to individual patients based on their genetic profile, lifestyle, and environment. Pharmacogenomics studies how genes affect drug response and guides dosage decisions.

The greenhouse effect occurs when atmospheric gases like carbon dioxide, methane, and water vapour trap heat radiating from Earth's surface. Human activity has significantly increased CO2 concentrations since industrialisation.

Ocean acidification is caused by the absorption of atmospheric carbon dioxide, forming carbonic acid. This lowers ocean pH, threatening marine ecosystems particularly coral reefs and shell-forming organisms.

The Antarctic ice sheet holds approximately 26.5 million cubic kilometres of ice. Its complete melting would raise global sea levels by around 58 metres, though this would take thousands of years.

Renewable energy sources including solar, wind, and hydroelectric power produce electricity without direct greenhouse gas emissions. Their falling costs have made them increasingly competitive with fossil fuels.

The Paris Agreement set a goal of limiting global average temperature increase to 1.5 degrees Celsius above pre-industrial levels. Countries submit nationally determined contributions outlining their emissions reduction plans.

Permafrost covers approximately 25 percent of the Northern Hemisphere's land surface. As it thaws due to warming temperatures it releases stored carbon dioxide and methane, creating a positive feedback loop.

Deforestation contributes approximately 10 percent of global greenhouse gas emissions. Tropical forests are particularly critical carbon sinks, with the Amazon alone storing around 150 billion tonnes of carbon.

Solar geoengineering proposals such as stratospheric aerosol injection aim to reflect sunlight back into space to cool the planet. These approaches carry significant risks and ethical concerns about unilateral deployment.

Sea level rise is caused by thermal expansion of warming ocean water and melting land ice. Current rates of rise are around 3.7 millimetres per year and are accelerating.

Electric vehicles reduce tailpipe emissions but their overall environmental impact depends on the electricity source. In regions with high renewable energy penetration they offer significant lifecycle emissions reductions.

# Apex Corp Quarterly Sales Report 2020
Quarter,Product_A,Product_B,Product_C,Total
Q1,27611,16271,22716,66598
Q2,25455,72937,55870,154262
Q3,68915,69898,48702,187515
Q4,59756,35519,12151,107426

# BlueStar Ltd Quarterly Sales Report 2021
Q1,31605,70847,45423,147875
Q2,79814,70557,18021,168392
Q3,35154,69312,57049,161515
Q4,32858,11152,45648,89658

# Crimson Industries Quarterly Sales Report 2022
Q1,69566,30925,47259,147750
Q2,12606,67432,35400,115438
Q3,56736,46729,30372,133837
Q4,29038,27052,33100,89190

# Delta Systems Quarterly Sales Report 2023
Q1,10461,74368,6459,91288
Q2,21282,48558,42452,112292
Q3,43846,21472,37772,103090
Q4,10589,61365,23753,95707

# Echo Ventures Quarterly Sales Report 2024
Q1,57824,35097,12270,105191
Q2,72144,19942,47523,139609
Q3,25317,51032,34723,111072
Q4,82870,62090,59230,204190

# Falcon Group Quarterly Sales Report 2025
Q1,68736,55498,52102,176336
Q2,76951,65175,32894,175020
Q3,84019,61277,7160,152456
Q4,44122,28202,27537,99861

# Genesis Holdings Quarterly Sales Report 2026
Q1,63524,73800,45992,183316
Q2,20672,26459,56672,103803
Q3,63599,14124,8182,85905
Q4,80481,14909,18449,113839

# Horizon Tech Quarterly Sales Report 2027
Q1,69719,8335,33122,111176
Q2,35436,24907,41898,102241
Q3,79643,59926,13807,153376
Q4,67772,58614,6516,132902

# Ironclad Inc Quarterly Sales Report 2028
Q1,29986,55898,48566,134450
Q2,84946,16816,42647,144409
Q3,10236,66150,18004,94390
Q4,57557,69576,40861,167994

# Jupiter Solutions Quarterly Sales Report 2029
Q1,20443,63351,42078,125872
Q2,23065,13017,6789,42871
Q3,44396,52995,32189,129580
Q4,39749,49033,36333,125115

# Sydney Monthly Climate Data 2014
Month,Min_C,Max_C,Avg_C,Rainfall_mm
Jan,5,22,13,111
Feb,-4,20,8,147
Mar,-2,29,13,159
Apr,-4,34,15,64
May,-4,20,8,121
Jun,8,20,14,71
Jul,-3,35,16,118
Aug,-4,36,16,41
Sep,2,38,20,170
Oct,-4,36,16,159
Nov,7,19,13,66
Dec,-4,35,15,44

# Melbourne Monthly Climate Data 2015
Jan,10,36,23,56
Feb,-1,38,18,72
Mar,-2,33,15,53
Apr,5,36,20,135
May,2,33,17,51
Jun,10,32,21,82
Jul,-2,19,8,60
Aug,-1,24,11,65
Sep,-5,26,10,33
Oct,-2,24,11,173
Nov,-1,20,9,154
Dec,4,33,18,116

# Brisbane Monthly Climate Data 2016
Jan,-4,33,14,147
Feb,9,33,21,163
Mar,-1,19,9,171
Apr,-5,24,9,120
May,1,34,17,73
Jun,-5,19,7,90
Jul,10,21,15,173
Aug,3,24,13,52
Sep,2,25,13,18
Oct,-5,20,7,145
Nov,4,32,18,22
Dec,7,23,15,140

# Perth Monthly Climate Data 2017
Jan,-5,29,12,116
Feb,2,31,16,12
Mar,6,28,17,13
Apr,2,29,15,53
May,-5,23,9,26
Jun,9,30,19,117
Jul,5,29,17,123
Aug,6,26,16,23
Sep,-1,37,18,20
Oct,-1,38,18,138
Nov,10,37,23,166
Dec,-3,28,12,62

# Adelaide Monthly Climate Data 2018
Jan,-5,32,13,20
Feb,-2,21,9,77
Mar,-1,26,12,27
Apr,4,30,17,162
May,-4,35,15,35
Jun,9,32,20,131
Jul,-3,20,8,10
Aug,10,27,18,10
Sep,-1,33,16,85
Oct,1,26,13,16
Nov,3,18,10,171
Dec,0,24,12,167

# Auckland Monthly Climate Data 2019
Jan,8,29,18,81
Feb,-1,18,8,38
Mar,3,25,14,44
Apr,5,34,19,83
May,-3,21,9,68
Jun,8,28,18,26
Jul,-1,18,8,25
Aug,6,22,14,100
Sep,9,21,15,55
Oct,10,34,22,15
Nov,4,21,12,111
Dec,2,37,19,23

# Wellington Monthly Climate Data 2020
Jan,2,23,12,167
Feb,-4,30,13,106
Mar,8,33,20,21
Apr,4,37,20,60
May,9,27,18,125
Jun,1,24,12,78
Jul,9,33,21,47
Aug,-4,21,8,13
Sep,4,30,17,156
Oct,1,36,18,21
Nov,-1,20,9,90
Dec,2,36,19,101

# Christchurch Monthly Climate Data 2021
Jan,5,38,21,119
Feb,-3,26,11,135
Mar,0,20,10,111
Apr,7,20,13,127
May,3,25,14,84
Jun,7,35,21,19
Jul,7,23,15,126
Aug,-3,32,14,177
Sep,4,27,15,104
Oct,-1,25,12,57
Nov,-4,24,10,167
Dec,0,27,13,102

# Darwin Monthly Climate Data 2022
Jan,-4,23,9,86
Feb,1,30,15,52
Mar,-3,26,11,161
Apr,0,28,14,38
May,6,29,17,179
Jun,-5,32,13,173
Jul,9,32,20,155
Aug,-5,37,16,13
Sep,7,35,21,67
Oct,-2,38,18,109
Nov,-2,32,15,83
Dec,-4,33,14,77

# Hobart Monthly Climate Data 2023
Jan,6,37,21,59
Feb,-1,22,10,75
Mar,2,24,13,160
Apr,8,34,21,91
May,4,33,18,23
Jun,3,25,14,140
Jul,10,22,16,158
Aug,5,32,18,164
Sep,-4,19,7,37
Oct,9,26,17,108
Nov,0,19,9,166
Dec,6,27,16,148

# Stock Market OHLCV Data 2024-01-15 Portfolio-1
Ticker,Open,High,Low,Close,Volume
APEX,293,332,284,307,41028387
APXC,535,544,511,511,31989649
APLX,315,355,303,315,48626990

# Stock Market OHLCV Data 2024-02-15 Portfolio-2
BLUE,272,291,243,278,3335228
BLSR,659,673,646,663,33349819
BLST,479,491,462,481,14927585

# Stock Market OHLCV Data 2024-03-15 Portfolio-3
CRMS,683,691,660,689,3181542
CRIM,98,138,89,121,39569828
CRMD,189,194,179,190,5541068

# Stock Market OHLCV Data 2024-04-15 Portfolio-4
DLTS,366,399,345,398,39192425
DELT,382,392,359,371,37716456
DLTA,401,437,390,432,34886152

# Stock Market OHLCV Data 2024-05-15 Portfolio-5
ECHO,384,411,358,404,24200715
ECHV,551,586,536,570,1632972
ECVC,549,574,534,560,20863497

# Stock Market OHLCV Data 2024-06-15 Portfolio-6
FALC,695,735,688,705,21112933
FLCN,65,102,40,94,37196675
FLGP,758,775,728,728,4544502

# Stock Market OHLCV Data 2024-07-15 Portfolio-7
GNSS,104,143,77,85,9617294
GNES,687,693,661,683,46859383
GNSH,571,599,556,556,28888431

# Stock Market OHLCV Data 2024-08-15 Portfolio-8
HRZN,430,462,421,436,24828364
HRZT,794,811,776,805,34322463
HOTZ,290,307,285,305,22096156

# Stock Market OHLCV Data 2024-09-15 Portfolio-9
IRND,306,326,287,299,14806934
IRCL,542,557,532,550,42039551
IRNC,532,548,507,522,42579962

# Stock Market OHLCV Data 2024-01-15 Portfolio-10
JPSS,770,801,756,758,16796118
JUPX,734,773,710,718,17268011
JPTS,781,815,758,762,5780717

def binary_search(arr, target):
    left, right = 0, len(arr) - 1
    while left <= right:
        mid = (left + right) // 2
        if arr[mid] == target: return mid
        elif arr[mid] < target: left = mid + 1
        else: right = mid - 1
    return -1

def quick_sort(arr):
    if len(arr) <= 1: return arr
    pivot = arr[len(arr) // 2]
    left  = [x for x in arr if x < pivot]
    mid   = [x for x in arr if x == pivot]
    right = [x for x in arr if x > pivot]
    return quick_sort(left) + mid + quick_sort(right)

class Node:
    def __init__(self, data): self.data = data; self.next = None
class LinkedList:
    def __init__(self): self.head = None
    def append(self, data):
        n = Node(data)
        if not self.head: self.head = n; return
        c = self.head
        while c.next: c = c.next
        c.next = n

def fibonacci(n):
    """Return nth Fibonacci number using iterative approach."""
    if n <= 0: return 0
    if n == 1: return 1
    a, b = 0, 1
    for _ in range(2, n + 1):
        a, b = b, a + b
    return b

class HashMap:
    def __init__(self, size=256):
        self.buckets = [[] for _ in range(size)]
        self.size = size
    def _hash(self, k): return hash(k) % self.size
    def put(self, k, v):
        b = self.buckets[self._hash(k)]
        for i, (ek, ev) in enumerate(b):
            if ek == k: b[i] = (k, v); return
        b.append((k, v))
    def get(self, k):
        for ek, ev in self.buckets[self._hash(k)]:
            if ek == k: return ev

def merge_sort(arr):
    mid   = len(arr) // 2
    left  = merge_sort(arr[:mid])
    right = merge_sort(arr[mid:])
    result, i, j = [], 0, 0
    while i < len(left) and j < len(right):
        if left[i] <= right[j]: result.append(left[i]); i += 1
        else: result.append(right[j]); j += 1
    return result + left[i:] + right[j:]

def dfs(graph, start, visited=None):
    """Depth-first search traversal of a graph."""
    if visited is None: visited = set()
    visited.add(start)
    for neighbor in graph.get(start, []):
        if neighbor not in visited:
            dfs(graph, neighbor, visited)
    return visited

from collections import OrderedDict
class LRUCache:
    def __init__(self, capacity):
        self.cache = OrderedDict()
        self.cap = capacity
    def get(self, key):
        if key not in self.cache: return -1
        self.cache.move_to_end(key)
        return self.cache[key]
    def put(self, key, value):
        self.cache[key] = value
        if len(self.cache) > self.cap:
            self.cache.popitem(last=False)

class TrieNode:
    def __init__(self): self.children = {}; self.is_end = False
class Trie:
    def __init__(self): self.root = TrieNode()
    def insert(self, word):
        node = self.root
        for ch in word:
            if ch not in node.children: node.children[ch] = TrieNode()
            node = node.children[ch]
        node.is_end = True
    def search(self, word):
        for ch in word: 
            if ch not in node.children: return False
        return node.is_end

import heapq
def dijkstra(graph, start):
    """Dijkstra shortest path algorithm."""
    dist = {node: float('inf') for node in graph}
    dist[start] = 0
    pq = [(0, start)]
    while pq:
        d, u = heapq.heappop(pq)
        if d > dist[u]: continue
        for v, w in graph[u]:
            if dist[u] + w < dist[v]:
                dist[v] = dist[u] + w
                heapq.heappush(pq, (dist[v], v))
    return dist

-- customer_total_spending: JOIN customers and orders, aggregate total spend
SELECT c.customer_name, SUM(o.total_amount) AS total_spent
FROM customers c JOIN orders o ON c.customer_id = o.customer_id
WHERE o.status = 'completed'
GROUP BY c.customer_name HAVING SUM(o.total_amount) > 500
ORDER BY total_spent DESC LIMIT 20;

-- employee_salary_window_rank: window function AVG and RANK per department
SELECT employee_id, department, salary,
    AVG(salary) OVER (PARTITION BY department) AS dept_avg,
    RANK() OVER (PARTITION BY department ORDER BY salary DESC) AS salary_rank
FROM employees ORDER BY department, salary_rank;

-- recursive_org_chart: recursive CTE to traverse employee hierarchy
WITH RECURSIVE org AS (
    SELECT id, name, manager_id, 1 AS level FROM employees WHERE manager_id IS NULL
    UNION ALL
    SELECT e.id, e.name, e.manager_id, o.level+1 FROM employees e JOIN org o ON e.manager_id=o.id
)
SELECT id, name, level FROM org ORDER BY level;

-- inventory_transaction: atomic inventory deduction with audit log
BEGIN;
UPDATE inventory SET quantity = quantity - 10
    WHERE product_id = 42 AND quantity >= 10;
INSERT INTO order_log(product_id, quantity, transaction_date)
    VALUES (42, 10, CURRENT_DATE);
COMMIT;

-- create_documents_table: DDL with full-text search index
CREATE TABLE documents(
    id SERIAL PRIMARY KEY,
    title VARCHAR(500),
    content TEXT,
    created_at TIMESTAMP DEFAULT NOW()
);
CREATE INDEX idx_doc_title ON documents(title);
CREATE INDEX idx_doc_created ON documents(created_at DESC);

-- product_revenue_pivot: pivot monthly revenue with CASE WHEN
SELECT product_id,
    SUM(CASE WHEN MONTH(sale_date)=1 THEN amount ELSE 0 END) AS jan,
    SUM(CASE WHEN MONTH(sale_date)=2 THEN amount ELSE 0 END) AS feb,
    SUM(CASE WHEN MONTH(sale_date)=3 THEN amount ELSE 0 END) AS mar,
    SUM(amount) AS total
FROM sales GROUP BY product_id ORDER BY total DESC;

-- running_total_cumulative: cumulative SUM window function over time
SELECT order_date, daily_revenue,
    SUM(daily_revenue) OVER (ORDER BY order_date ROWS UNBOUNDED PRECEDING) AS running_total,
    AVG(daily_revenue) OVER (ORDER BY order_date ROWS 6 PRECEDING) AS rolling_7day_avg
FROM daily_sales ORDER BY order_date;

-- find_duplicate_emails: detect duplicates with GROUP BY HAVING COUNT
SELECT email, COUNT(*) AS occurrences
FROM users
GROUP BY email
HAVING COUNT(*) > 1
ORDER BY occurrences DESC;

-- upsert_user_profile: INSERT with ON CONFLICT DO UPDATE (upsert)
INSERT INTO user_profiles (user_id, display_name, bio, updated_at)
VALUES (42, 'Alice', 'Software engineer', NOW())
ON CONFLICT (user_id)
DO UPDATE SET
    display_name = EXCLUDED.display_name,
    bio = EXCLUDED.bio,
    updated_at = EXCLUDED.updated_at;

-- delete_old_audit_logs: delete logs older than 90 days using partitioned DELETE
DELETE FROM audit_logs
WHERE created_at < NOW() - INTERVAL '90 days'
    AND log_level IN ('DEBUG', 'INFO');
VACUUM ANALYZE audit_logs;

#!/bin/bash
# batch_file_word_count: count lines in each .txt file in ./input/
for f in ./input/*.txt; do
    base=$(basename "$f" .txt)
    wc -l "$f" > "./output/${base}_count.txt"
done

# cpu_usage_monitor: log CPU usage every 60 seconds indefinitely
while true; do
    CPU=$(top -bn1 | grep 'Cpu(s)' | awk '{print $2}')
    echo "$(date '+%Y-%m-%d %H:%M:%S') CPU=${CPU}%" >> /var/log/cpu_monitor.log
    sleep 60
done

# daily_backup_tar: create dated tarball backup and clean up old backups
DEST="/backup/$(date +%Y%m%d)"
mkdir -p "$DEST"
tar -czf "$DEST/data_backup.tar.gz" /home/user/data
find /backup -maxdepth 1 -mtime +30 -type d -exec rm -rf {} +
echo "Backup complete: $DEST"

# deploy_application: pull latest code, install deps, migrate, restart
set -e
cd /opt/app
git pull origin main
pip install -r requirements.txt -q
python manage.py migrate --no-input
systemctl restart app
echo "Deployment complete"

# csv_dedup_sort: remove header, sort by column 2, deduplicate, take top 100
tail -n +2 "$1" | sort -t',' -k2 -rn | awk -F',' '!seen[$1]++' | head -100 > top100.csv

# disk_usage_alert: send email alert when disk usage exceeds 80 percent
THRESHOLD=80
USAGE=$(df / | tail -1 | awk '{print $5}' | tr -d '%')
if [ "$USAGE" -gt "$THRESHOLD" ]; then
    echo "Disk usage at ${USAGE}%" | mail -s "DISK ALERT $(hostname)" admin@example.com
fi

# log_rotation_compress: compress logs older than 7 days in /var/log/app
find /var/log/app -name '*.log' -mtime +7 | while read f; do
    gzip -9 "$f"
    echo "Compressed: $f"
done

# ssh_tunnel_setup: create persistent reverse SSH tunnel with autossh
autossh -M 0 -f -N \
    -o 'ServerAliveInterval 30' \
    -o 'ServerAliveCountMax 3' \
    -R 2222:localhost:22 \
    user@remote.example.com

# docker_cleanup: remove stopped containers, dangling images, unused volumes
docker container prune -f
docker image prune -f
docker volume prune -f
docker network prune -f
echo "Docker cleanup complete. Disk freed:" && docker system df

# git_branch_cleanup: delete local branches already merged into main
git fetch --prune
git branch --merged main | grep -v '\* main' | grep -v 'main' | xargs -r git branch -d
echo "Merged branches cleaned up"