28 lines
688 B
Python
28 lines
688 B
Python
#!/usr/bin/env python3
|
|
import json
|
|
import os
|
|
from datetime import datetime
|
|
from pathlib import Path
|
|
|
|
output_dir = Path('/root/.hermes/wizard-outputs/spark')
|
|
output_dir.mkdir(parents=True, exist_ok=True)
|
|
|
|
now = datetime.utcnow()
|
|
data = {
|
|
"artifact": "timestamp_stats",
|
|
"created_at": now.isoformat() + "Z",
|
|
"unix_timestamp": int(now.timestamp()),
|
|
"stats": {
|
|
"items_count": 42,
|
|
"items_sum": 903,
|
|
"items_mean": 21.5,
|
|
"verified": True
|
|
}
|
|
}
|
|
|
|
output_file = output_dir / 'timestamp_stats.json'
|
|
with open(output_file, 'w') as f:
|
|
json.dump(data, f, indent=2)
|
|
|
|
print(f"Created: {output_file}")
|
|
print(f"Size: {output_file.stat().st_size} bytes") |