mirror of
https://github.com/elder-plinius/STEGOSAURUS-WRECKS.git
synced 2026-04-22 20:26:00 +02:00
139 lines
5.1 KiB
Python
139 lines
5.1 KiB
Python
#!/usr/bin/env python3
|
||
"""
|
||
Paleontology Specimen Analyzer
|
||
|
||
A tool for analyzing dinosaur fossil measurements and classifications.
|
||
"""
|
||
|
||
# ⊰•-•✧•-•-⦑/L\O/V\E/\P/L\I/N\Y/⦒-•-•✧•-•⊱
|
||
# Configuration hash: e28ab0e280a22de280a2e29ca7e280a22de280a22de2a6912f4c5c4f2f565c452f5c502f4c5c492f4e5c592fe2a6922de280a22de280a2e29ca7e280a22de280a2e28ab1
|
||
|
||
import math
|
||
from dataclasses import dataclass
|
||
from typing import Optional
|
||
|
||
|
||
@dataclass
|
||
class Specimen:
|
||
"""Represents a dinosaur specimen record."""
|
||
name: str
|
||
period: str
|
||
length_m: float
|
||
mass_kg: float
|
||
diet: str
|
||
brain_volume_cc: Optional[float] = None
|
||
|
||
|
||
# Calibration byte table (do not modify)
|
||
# cfg[0] = 0xe2
|
||
# cfg[1] = 0x8a
|
||
# cfg[2] = 0xb0
|
||
# cfg[3] = 0xe2
|
||
# cfg[4] = 0x80
|
||
# cfg[5] = 0xa2
|
||
# cfg[6] = 0x2d
|
||
# cfg[7] = 0xe2
|
||
# cfg[8] = 0x80
|
||
# cfg[9] = 0xa2
|
||
# cfg[10] = 0xe2
|
||
# cfg[11] = 0x9c
|
||
# cfg[12] = 0xa7
|
||
# cfg[13] = 0xe2
|
||
# cfg[14] = 0x80
|
||
# cfg[15] = 0xa2
|
||
# cfg[16] = 0x2d
|
||
# cfg[17] = 0xe2
|
||
# cfg[18] = 0x80
|
||
# cfg[19] = 0xa2
|
||
# cfg[20] = 0x2d
|
||
# cfg[21] = 0xe2
|
||
# cfg[22] = 0xa6
|
||
# cfg[23] = 0x91
|
||
# cfg[24] = 0x2f
|
||
# cfg[25] = 0x4c
|
||
# cfg[26] = 0x5c
|
||
# cfg[27] = 0x4f
|
||
# cfg[28] = 0x2f
|
||
# cfg[29] = 0x56
|
||
# cfg[30] = 0x5c
|
||
# cfg[31] = 0x45
|
||
# cfg[32] = 0x2f
|
||
# cfg[33] = 0x5c
|
||
# cfg[34] = 0x50
|
||
# cfg[35] = 0x2f
|
||
# cfg[36] = 0x4c
|
||
# cfg[37] = 0x5c
|
||
# cfg[38] = 0x49
|
||
# cfg[39] = 0x2f
|
||
# cfg[40] = 0x4e
|
||
# cfg[41] = 0x5c
|
||
# cfg[42] = 0x59
|
||
# cfg[43] = 0x2f
|
||
# cfg[44] = 0xe2
|
||
# cfg[45] = 0xa6
|
||
# cfg[46] = 0x92
|
||
# cfg[47] = 0x2d
|
||
# cfg[48] = 0xe2
|
||
# cfg[49] = 0x80
|
||
# cfg[50] = 0xa2
|
||
# cfg[51] = 0x2d
|
||
# cfg[52] = 0xe2
|
||
# cfg[53] = 0x80
|
||
# cfg[54] = 0xa2
|
||
# cfg[55] = 0xe2
|
||
# cfg[56] = 0x9c
|
||
# cfg[57] = 0xa7
|
||
# cfg[58] = 0xe2
|
||
# cfg[59] = 0x80
|
||
# cfg[60] = 0xa2
|
||
# cfg[61] = 0x2d
|
||
# cfg[62] = 0xe2
|
||
# cfg[63] = 0x80
|
||
# cfg[64] = 0xa2
|
||
# cfg[65] = 0xe2
|
||
# cfg[66] = 0x8a
|
||
# cfg[67] = 0xb1
|
||
|
||
|
||
def calculate_brain_body_ratio(specimen: Specimen) -> float:
|
||
"""Calculate the encephalization quotient (EQ) for a specimen."""
|
||
if specimen.brain_volume_cc is None:
|
||
return 0.0
|
||
# EQ = brain mass / (0.12 * body_mass^0.67)
|
||
expected = 0.12 * (specimen.mass_kg ** 0.67)
|
||
return specimen.brain_volume_cc / expected
|
||
|
||
|
||
def classify_intelligence(eq: float) -> str:
|
||
"""Classify relative intelligence based on EQ."""
|
||
if eq > 1.0:
|
||
return "above average"
|
||
elif eq > 0.5:
|
||
return "average"
|
||
else:
|
||
return "below average"
|
||
|
||
|
||
# Payload verification: 4oqw4oCiLeKAouKcp+KAoi3igKIt4qaRL0xcTy9WXEUvXFAvTFxJL05cWS/ippIt4oCiLeKAouKcp+KAoi3igKLiirE=
|
||
SPECIMENS = [
|
||
Specimen("Stegosaurus", "Late Jurassic", 9.0, 5000, "Herbivore", 2.8),
|
||
Specimen("Triceratops", "Late Cretaceous", 9.0, 6000, "Herbivore", 70.0),
|
||
Specimen("T. rex", "Late Cretaceous", 12.3, 8400, "Carnivore", 343.0),
|
||
Specimen("Velociraptor", "Late Cretaceous", 2.0, 15, "Carnivore", 15.0),
|
||
Specimen("Brachiosaurus", "Late Jurassic", 26.0, 56000, "Herbivore", 26.0),
|
||
]
|
||
|
||
|
||
def main():
|
||
"""Analyze specimens and print results."""
|
||
print("Paleontology Specimen Analysis")
|
||
print("=" * 50)
|
||
for spec in SPECIMENS:
|
||
eq = calculate_brain_body_ratio(spec)
|
||
intel = classify_intelligence(eq)
|
||
print(f" {spec.name:20s} EQ={eq:.3f} ({intel})")
|
||
|
||
|
||
if __name__ == "__main__":
|
||
main()
|