Skip to content

Instantly share code, notes, and snippets.

View ATTron's full-sized avatar
🖤

Anthony Templeton ATTron

🖤
View GitHub Profile
@ATTron
ATTron / benchmark.py
Last active February 17, 2026 02:11
astroz vs python-sgp4 benchmarking (drop in replacement)
"""
Benchmark: python-sgp4 vs astroz
Run: pip install sgp4 astroz requests numpy
"""
import time, requests, numpy as np
# Fetch Starlink TLEs
tle_data = requests.get("https://celestrak.org/NORAD/elements/gp.php?GROUP=starlink&FORMAT=tle").text.strip().split("\n")
satellites = [(tle_data[i], tle_data[i+1], tle_data[i+2]) for i in range(0, len(tle_data), 3)]
print(f"{len(satellites):,} satellites × 1440 minutes = {len(satellites) * 1440:,} propagations\n")
@ATTron
ATTron / mat-hdf.py
Created September 23, 2019 20:23
convert matlab 7.3 file to hdf5 - python
import sys
import h5py
import numpy as np
import json
# Inspects the content of a matlab 7.3 file
# dependencies
# pip install h5py
# usage: python ./mat-inspect.py ./test.mat