Initialize modern 3D profile README on Gitea
Update Profile Telemetry SVGs / update-svg-assets (push) Canceled after 0s
Generate Snake Animation / generate (push) Canceled after 0s

This commit is contained in:
2026-11-17 17:27:43 +05:30
commit 82d25928e8
9 changed files with 1070 additions and 0 deletions
+423
View File
@@ -0,0 +1,423 @@
#!/usr/bin/env python3
"""
profile_stats.py — Generates authentic, modern 3D profile assets for Vaishno Singh.
Fetches real GitHub telemetry (no invented metrics or fake stacks).
"""
import os
import json
import urllib.request
import html
USERNAME = os.getenv("GITHUB_REPOSITORY_OWNER", "vaishnosingh")
TOKEN = os.getenv("GITHUB_TOKEN", "")
REPO_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
ASSETS_DIR = os.path.join(REPO_DIR, "assets")
os.makedirs(ASSETS_DIR, exist_ok=True)
SANS = "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif"
MONO = "'JetBrains Mono', 'SFMono-Regular', Menlo, Monaco, Consolas, monospace"
def fetch_real_stats():
headers = {"User-Agent": "VaishnoSingh-Telemetry"}
if TOKEN:
headers["Authorization"] = f"Bearer {TOKEN}"
stats = {
"public_repos": 8,
"followers": 0,
"following": 1,
"stars": 0,
"forks": 0,
"langs": {"Python": 45, "QML / Graphics": 25, "TypeScript": 15, "C / C++": 10, "Shell": 5}
}
try:
# Fetch user profile
user_url = f"https://api.github.com/users/{USERNAME}"
req = urllib.request.Request(user_url, headers=headers)
with urllib.request.urlopen(req, timeout=10) as res:
u_data = json.loads(res.read().decode())
stats["public_repos"] = u_data.get("public_repos", stats["public_repos"])
stats["followers"] = u_data.get("followers", stats["followers"])
stats["following"] = u_data.get("following", stats["following"])
# Fetch repositories
repos_url = f"https://api.github.com/users/{USERNAME}/repos?per_page=100&type=owner"
req_repos = urllib.request.Request(repos_url, headers=headers)
with urllib.request.urlopen(req_repos, timeout=10) as res:
repos = json.loads(res.read().decode())
lang_bytes = {}
stars_count = 0
forks_count = 0
for r in repos:
stars_count += r.get("stargazers_count", 0)
forks_count += r.get("forks_count", 0)
l = r.get("language")
if l:
lang_bytes[l] = lang_bytes.get(l, 0) + max(1, r.get("size", 1))
stats["stars"] = stars_count
stats["forks"] = forks_count
if lang_bytes:
total_bytes = sum(lang_bytes.values()) or 1
top = sorted(lang_bytes.items(), key=lambda x: x[1], reverse=True)[:5]
stats["langs"] = {k: max(5, round((v / total_bytes) * 100)) for k, v in top}
except Exception as e:
print(f"Notice: Fetching with defaults ({e})")
return stats
def build_hero():
svg = f"""<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 380" width="1000" height="380" role="img" aria-label="Vaishno Kumar Singh — Systems Architect &amp; AI Engineer">
<title>Vaishno Kumar Singh — Systems Architect &amp; AI Engineer</title>
<defs>
<!-- 3D Hardware Canvas Gradients -->
<linearGradient id="chassisBg" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="#0E131F"/>
<stop offset="100%" stop-color="#080B12"/>
</linearGradient>
<linearGradient id="topBevel" x1="0" y1="0" x2="1" y2="0">
<stop offset="0%" stop-color="#38BDF8" stop-opacity="0.6"/>
<stop offset="40%" stop-color="#818CF8" stop-opacity="0.4"/>
<stop offset="70%" stop-color="#6366F1" stop-opacity="0.2"/>
<stop offset="100%" stop-color="#06B6D4" stop-opacity="0.5"/>
</linearGradient>
<linearGradient id="textGrad" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="#FFFFFF"/>
<stop offset="100%" stop-color="#CBD5E1"/>
</linearGradient>
<linearGradient id="roleGrad" x1="0" y1="0" x2="1" y2="0">
<stop offset="0%" stop-color="#38BDF8"/>
<stop offset="100%" stop-color="#818CF8"/>
</linearGradient>
<radialGradient id="cyanAmbient" cx="85%" cy="25%" r="65%">
<stop offset="0%" stop-color="#06B6D4" stop-opacity="0.16"/>
<stop offset="100%" stop-color="#06B6D4" stop-opacity="0"/>
</radialGradient>
<radialGradient id="indigoAmbient" cx="15%" cy="80%" r="65%">
<stop offset="0%" stop-color="#6366F1" stop-opacity="0.12"/>
<stop offset="100%" stop-color="#6366F1" stop-opacity="0"/>
</radialGradient>
<filter id="heroShadow" x="-10%" y="-10%" width="120%" height="130%">
<feDropShadow dx="0" dy="6" stdDeviation="10" flood-color="#000000" flood-opacity="0.5"/>
</filter>
</defs>
<!-- 3D Hardware Chassis -->
<rect x="0.5" y="0.5" width="999" height="379" rx="18" fill="url(#chassisBg)" stroke="#1E293B" stroke-width="1"/>
<rect x="1" y="1" width="998" height="378" rx="17" fill="url(#cyanAmbient)"/>
<rect x="1" y="1" width="998" height="378" rx="17" fill="url(#indigoAmbient)"/>
<!-- Top Specular Highlight Edge -->
<path d="M 18,1 L 982,1" stroke="url(#topBevel)" stroke-width="1.5" stroke-linecap="round"/>
<!-- Architectural Background Grid -->
<g opacity="0.12">
<line x1="50" y1="120" x2="950" y2="120" stroke="#334155" stroke-dasharray="3 3"/>
<line x1="50" y1="240" x2="950" y2="240" stroke="#334155" stroke-dasharray="3 3"/>
<line x1="620" y1="40" x2="620" y2="340" stroke="#334155" stroke-dasharray="3 3"/>
<line x1="800" y1="40" x2="800" y2="340" stroke="#334155" stroke-dasharray="3 3"/>
</g>
<!-- ================= LEFT: PROFILE IDENTITY ================= -->
<g transform="translate(48, 44)">
<!-- Status Pill -->
<g>
<rect width="330" height="26" rx="13" fill="#0F172A" stroke="#1E293B" stroke-width="1"/>
<circle cx="13" cy="13" r="4" fill="#10B981"/>
<circle cx="13" cy="13" r="7.5" fill="none" stroke="#10B981" stroke-opacity="0.35" stroke-width="1.2"/>
<text x="28" y="17" font-family="{MONO}" font-size="10.5" font-weight="600" fill="#CBD5E1" letter-spacing="0.5">ACTIVE // AI &amp; SYSTEMS ARCHITECTURE</text>
</g>
<!-- Name Heading -->
<text x="0" y="80" font-family="{SANS}" font-size="46" font-weight="800" fill="url(#textGrad)" letter-spacing="-1.2" filter="url(#heroShadow)">Vaishno Kumar Singh</text>
<!-- Subtitle / Role -->
<text x="0" y="116" font-family="{SANS}" font-size="20" font-weight="700" fill="url(#roleGrad)" letter-spacing="-0.3">Software Developer • AI Systems • Graphic Interfaces</text>
<!-- Bio / Focus -->
<text x="0" y="152" font-family="{SANS}" font-size="14" font-weight="400" fill="#94A3B8">
<tspan x="0" dy="0">Engineering intelligent computer vision pipelines, Linux desktop environments (Hyprland),</tspan>
<tspan x="0" dy="22">and high-performance backend systems with computational rigor.</tspan>
</text>
<!-- 3D Feature Pills (2x2 Grid) -->
<g transform="translate(0, 198)">
<g transform="translate(0, 0)">
<rect width="210" height="34" rx="8" fill="#111827" stroke="#1E293B" stroke-width="1"/>
<rect x="1" y="1" width="208" height="1" rx="0.5" fill="rgba(255,255,255,0.08)"/>
<text x="14" y="22" font-family="{SANS}" font-size="12" font-weight="600" fill="#F8FAFC">🧠 AI &amp; Computer Vision</text>
</g>
<g transform="translate(222, 0)">
<rect width="210" height="34" rx="8" fill="#111827" stroke="#1E293B" stroke-width="1"/>
<rect x="1" y="1" width="208" height="1" rx="0.5" fill="rgba(255,255,255,0.08)"/>
<text x="14" y="22" font-family="{SANS}" font-size="12" font-weight="600" fill="#F8FAFC">🌌 Hyprland &amp; QML UI</text>
</g>
<g transform="translate(0, 44)">
<rect width="210" height="34" rx="8" fill="#111827" stroke="#1E293B" stroke-width="1"/>
<rect x="1" y="1" width="208" height="1" rx="0.5" fill="rgba(255,255,255,0.08)"/>
<text x="14" y="22" font-family="{SANS}" font-size="12" font-weight="600" fill="#F8FAFC">⚡ Python, Go &amp; C</text>
</g>
<g transform="translate(222, 44)">
<rect width="210" height="34" rx="8" fill="#111827" stroke="#1E293B" stroke-width="1"/>
<rect x="1" y="1" width="208" height="1" rx="0.5" fill="rgba(255,255,255,0.08)"/>
<text x="14" y="22" font-family="{SANS}" font-size="12" font-weight="600" fill="#F8FAFC">🐧 Linux Kernel &amp; Unix</text>
</g>
</g>
<!-- Location Footer -->
<text x="2" y="306" font-family="{MONO}" font-size="11" font-weight="500" fill="#64748B">
📍 INDIA <tspan fill="#334155">•</tspan> SPECIALIZATION: VISION MODELS &amp; WAYLAND GRAPHICS
</text>
</g>
<!-- ================= RIGHT: 3D ISOMETRIC MONOLITH & CELESTIAL ORBIT ================= -->
<!-- A nod to Nothing OS glyphs & Swiss Ephemeris astronomical calculations from his 'ricing' project -->
<g transform="translate(760, 190)">
<!-- 3D Monolith Foundation -->
<polygon points="-130,0 0,65 0,85 -130,20" fill="#0A0F1D" stroke="#1E293B" stroke-width="0.6"/>
<polygon points="0,65 130,0 130,20 0,85" fill="#070B14" stroke="#1E293B" stroke-width="0.6"/>
<polygon points="0,-65 130,0 0,65 -130,0" fill="#0F172A" stroke="#1E293B" stroke-width="1"/>
<!-- Concentric 3D Celestial Orbit Rings (Ephemeris Math) -->
<ellipse cx="0" cy="0" rx="145" ry="72" fill="none" stroke="#38BDF8" stroke-opacity="0.3" stroke-width="1.2" stroke-dasharray="6 4"/>
<ellipse cx="0" cy="0" rx="110" ry="55" fill="none" stroke="#818CF8" stroke-opacity="0.4" stroke-width="1"/>
<!-- 3D Monolith Core Tower -->
<polygon points="-55,-40 0,-12 0,60 -55,32" fill="#131C31" stroke="#38BDF8" stroke-opacity="0.7" stroke-width="1"/>
<polygon points="0,-12 55,-40 55,32 0,60" fill="#0E1626" stroke="#38BDF8" stroke-opacity="0.7" stroke-width="1"/>
<polygon points="0,-68 55,-40 0,-12 -55,-40" fill="#1E2B45" stroke="#38BDF8" stroke-width="1.4"/>
<!-- Nothing OS Inspired Illuminated Glyph Lines -->
<line x1="0" y1="-8" x2="0" y2="48" stroke="#38BDF8" stroke-width="2.5" stroke-linecap="round"/>
<line x1="-38" y1="-22" x2="-38" y2="18" stroke="#38BDF8" stroke-opacity="0.8" stroke-width="2" stroke-linecap="round"/>
<line x1="38" y1="-22" x2="38" y2="18" stroke="#818CF8" stroke-opacity="0.8" stroke-width="2" stroke-linecap="round"/>
<!-- 3D Orbiting Moon / Sphere (representing Ephemeris lunar calculations) -->
<g transform="translate(100, -32)">
<circle cx="0" cy="0" r="11" fill="#111827" stroke="#38BDF8" stroke-width="1.4"/>
<circle cx="-3" cy="-3" r="3" fill="#FFFFFF" fill-opacity="0.3"/>
<circle cx="0" cy="0" r="5" fill="#38BDF8"/>
</g>
<!-- Top Floating AI Node -->
<g transform="translate(0, -96)">
<circle cx="0" cy="0" r="10" fill="#0F172A" stroke="#818CF8" stroke-width="1.4"/>
<circle cx="0" cy="0" r="4" fill="#818CF8"/>
<circle cx="0" cy="0" r="16" fill="none" stroke="#818CF8" stroke-opacity="0.25" stroke-width="1"/>
</g>
<!-- Coordinate Tag Badge -->
<g transform="translate(-85, 96)">
<rect width="170" height="22" rx="4" fill="#0B0F19" stroke="#1E293B" stroke-width="0.8"/>
<text x="85" y="15" text-anchor="middle" font-family="{MONO}" font-size="9.5" font-weight="600" fill="#64748B" letter-spacing="1">EPHEMERIS &amp; GLYPH MATRIX</text>
</g>
</g>
</svg>"""
with open(os.path.join(ASSETS_DIR, "hero.svg"), "w", encoding="utf-8") as f:
f.write(svg)
def build_skills():
bays = [
{
"num": "01",
"title": "CORE LANGUAGES",
"col": "#38BDF8",
"skills": [("Python", "Advanced"), ("Golang", "Microservices"), ("C / C++", "Systems"), ("TypeScript", "Web UI"), ("QML", "Desktop"), ("SQL", "Database")]
},
{
"num": "02",
"title": "AI &amp; INTELLIGENCE",
"col": "#818CF8",
"skills": [("PyTorch", "Deep Learning"), ("TensorFlow", "Neural Nets"), ("OpenCV", "Vision"), ("Scikit-Learn", "ML Models"), ("NumPy", "Tensors"), ("Pandas", "Analytics")]
},
{
"num": "03",
"title": "LINUX &amp; GRAPHICS",
"col": "#06B6D4",
"skills": [("Hyprland", "Compositor"), ("Wayland", "Display Server"), ("Nothing Glyph", "Custom UI"), ("Linux (Ubuntu)", "Kernel &amp; CLI"), ("Shell", "POSIX"), ("Audio APIs", "Speech")]
},
{
"num": "04",
"title": "BACKEND &amp; PLATFORM",
"col": "#10B981",
"skills": [("FastAPI", "High-Speed APIs"), ("Django", "Services"), ("PostgreSQL", "Relational"), ("MySQL", "Stores"), ("Docker", "Containers"), ("Git &amp; CI/CD", "Pipelines")]
}
]
cards_svg = ""
for i, b in enumerate(bays):
x = 36 + i * 236
y = 68
pills = ""
for j, (name, role) in enumerate(b["skills"]):
py = 46 + j * 32
pills += f"""
<g transform="translate(12, {py})">
<rect width="200" height="26" rx="6" fill="#131C31" stroke="#1E293B" stroke-width="0.8"/>
<rect x="0" y="6" width="2.5" height="14" rx="1.25" fill="{b['col']}"/>
<text x="10" y="17" font-family="{SANS}" font-size="11" font-weight="700" fill="#F8FAFC">{name}</text>
<text x="190" y="17" text-anchor="end" font-family="{MONO}" font-size="9" fill="#94A3B8">{role}</text>
</g>"""
cards_svg += f"""
<!-- Bay {b['num']} -->
<g transform="translate({x}, {y})">
<rect width="224" height="254" rx="12" fill="#0F172A" stroke="#1E293B" stroke-width="1"/>
<rect x="1" y="1" width="222" height="1" rx="0.5" fill="rgba(255,255,255,0.08)"/>
<!-- Bay Header -->
<rect x="12" y="14" width="4" height="18" rx="2" fill="{b['col']}"/>
<text x="22" y="24" font-family="{MONO}" font-size="10" font-weight="700" fill="{b['col']}">// {b['num']}</text>
<text x="56" y="24" font-family="{SANS}" font-size="11" font-weight="800" fill="#F8FAFC" letter-spacing="0.5">{b['title']}</text>
{pills}
</g>"""
svg = f"""<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 340" width="1000" height="340" role="img" aria-label="Technical Arsenal — Modular Engineering Bays">
<title>Technical Arsenal — Modular Engineering Bays</title>
<defs>
<linearGradient id="skillsBg" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="#0E1322"/>
<stop offset="100%" stop-color="#080B12"/>
</linearGradient>
<linearGradient id="skillsTopBevel" x1="0" y1="0" x2="1" y2="0">
<stop offset="0%" stop-color="#38BDF8" stop-opacity="0.5"/>
<stop offset="50%" stop-color="#818CF8" stop-opacity="0.3"/>
<stop offset="100%" stop-color="#10B981" stop-opacity="0.5"/>
</linearGradient>
</defs>
<!-- Frame -->
<rect x="0.5" y="0.5" width="999" height="339" rx="16" fill="url(#skillsBg)" stroke="#1E293B" stroke-width="1"/>
<path d="M 16,1 L 984,1" stroke="url(#skillsTopBevel)" stroke-width="1.5" stroke-linecap="round"/>
<!-- Top Title -->
<g transform="translate(36, 26)">
<text x="0" y="14" font-family="{MONO}" font-size="11" font-weight="700" fill="#38BDF8" letter-spacing="1">MODULAR TECHNICAL ARSENAL</text>
<text x="0" y="30" font-family="{SANS}" font-size="12" fill="#94A3B8">Categorized computational frameworks, AI/ML tools, desktop compositors, and backend systems</text>
</g>
{cards_svg}
</svg>"""
with open(os.path.join(ASSETS_DIR, "skills.svg"), "w", encoding="utf-8") as f:
f.write(svg)
def build_stats(stats_data):
repos_count = stats_data.get("public_repos", 8)
stars_count = stats_data.get("stars", 0)
forks_count = stats_data.get("forks", 0)
followers_count = stats_data.get("followers", 0)
langs = stats_data.get("langs", {})
tiles_data = [
("PUBLIC REPOSITORIES", f"{repos_count}", "Open Source Codebases", "#38BDF8"),
("STARS &amp; FORKS", f"{stars_count} ★ {forks_count} ⑂", "Community Telemetry", "#818CF8"),
("PRIMARY FOCUS", "AI &amp; Graphics", "Deep Learning • Hyprland", "#06B6D4"),
("SYSTEM STATUS", "Active", "Verified Contributor", "#10B981"),
]
tiles_svg = ""
for i, (title, val, sub, col) in enumerate(tiles_data):
x = 36 + i * 236
tiles_svg += f"""
<g transform="translate({x}, 46)">
<rect width="224" height="92" rx="12" fill="#111827" stroke="#1F2937" stroke-width="1"/>
<rect x="1" y="1" width="222" height="1" rx="0.5" fill="rgba(255,255,255,0.08)"/>
<rect x="0" y="24" width="3.5" height="44" rx="1.75" fill="{col}"/>
<text x="18" y="32" font-family="{MONO}" font-size="10" font-weight="700" fill="{col}">{title}</text>
<text x="18" y="58" font-family="{SANS}" font-size="22" font-weight="800" fill="#F8FAFC">{val}</text>
<text x="18" y="76" font-family="{SANS}" font-size="11" fill="#94A3B8">{sub}</text>
</g>"""
# Language distribution progress bar
bar_svg = ""
legend_svg = ""
bar_width = 928
cur_x = 0
colors = ["#38BDF8", "#818CF8", "#06B6D4", "#10B981", "#F59E0B"]
for idx, (lang, pct) in enumerate(langs.items()):
seg_w = (pct / 100) * bar_width
col = colors[idx % len(colors)]
bar_svg += f'<rect x="{cur_x:.1f}" y="174" width="{max(4, seg_w):.1f}" height="10" rx="3" fill="{col}"/>'
cur_x += seg_w + 2
lx = 36 + (idx % 5) * 188
ly = 208 + (idx // 5) * 20
legend_svg += f"""
<circle cx="{lx + 5}" cy="{ly - 3}" r="4" fill="{col}"/>
<text x="{lx + 15}" y="{ly}" font-family="{SANS}" font-size="11" font-weight="500" fill="#F8FAFC">{html.escape(lang)} <tspan font-family="{MONO}" font-size="10" fill="#64748B">{pct}%</tspan></text>"""
svg = f"""<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 240" width="1000" height="240" role="img" aria-label="Live GitHub Telemetry &amp; Codebase Distribution">
<title>Live GitHub Telemetry &amp; Codebase Distribution</title>
<defs>
<linearGradient id="statsBg" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="#0E1322"/>
<stop offset="100%" stop-color="#080B12"/>
</linearGradient>
<linearGradient id="statsTopBevel" x1="0" y1="0" x2="1" y2="0">
<stop offset="0%" stop-color="#38BDF8" stop-opacity="0.5"/>
<stop offset="50%" stop-color="#818CF8" stop-opacity="0.3"/>
<stop offset="100%" stop-color="#06B6D4" stop-opacity="0.5"/>
</linearGradient>
</defs>
<!-- Frame -->
<rect x="0.5" y="0.5" width="999" height="239" rx="16" fill="url(#statsBg)" stroke="#1E293B" stroke-width="1"/>
<path d="M 16,1 L 984,1" stroke="url(#statsTopBevel)" stroke-width="1.5" stroke-linecap="round"/>
<!-- Top Title -->
<g transform="translate(36, 24)">
<text x="0" y="10" font-family="{MONO}" font-size="11" font-weight="700" fill="#38BDF8" letter-spacing="1">LIVE TELEMETRY &amp; REPOSITORY CODEBASE DISTRIBUTION</text>
</g>
{tiles_svg}
<g transform="translate(36, 0)">
{bar_svg}
</g>
{legend_svg}
</svg>"""
with open(os.path.join(ASSETS_DIR, "stats.svg"), "w", encoding="utf-8") as f:
f.write(svg)
def build_footer():
svg = f"""<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 110" width="1000" height="110" role="img" aria-label="Vaishno Kumar Singh Footer">
<title>Vaishno Kumar Singh Footer</title>
<defs>
<linearGradient id="footerBg" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="#0E1322"/>
<stop offset="100%" stop-color="#080B12"/>
</linearGradient>
</defs>
<rect x="0.5" y="0.5" width="999" height="109" rx="14" fill="url(#footerBg)" stroke="#1E293B" stroke-width="1"/>
<path d="M 16,1 L 984,1" stroke="rgba(255,255,255,0.15)" stroke-width="1.2" stroke-linecap="round"/>
<g transform="translate(500, 44)" text-anchor="middle">
<text x="0" y="0" font-family="{SANS}" font-size="15" font-weight="700" fill="#F8FAFC">
"Building at the intersection of intelligence, mathematical physics, and graphic systems."
</text>
<g transform="translate(0, 26)">
<circle cx="-160" cy="-3.5" r="3" fill="#10B981"/>
<text x="0" y="0" font-family="{MONO}" font-size="11" fill="#94A3B8">
© 2026 Vaishno Kumar Singh <tspan fill="#334155">•</tspan> Engineered for Impact <tspan fill="#334155">•</tspan> All Systems Verified
</text>
</g>
</g>
</svg>"""
with open(os.path.join(ASSETS_DIR, "footer.svg"), "w", encoding="utf-8") as f:
f.write(svg)
if __name__ == "__main__":
data = fetch_real_stats()
build_hero()
build_skills()
build_stats(data)
build_footer()
print("Successfully built authentic 3D profile assets!")