Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /spraakbanken_karp-backend /repl_scripts /write_pickle.py
| # Exports a resource as pickle and jsonl. | |
| import json | |
| import pickle | |
| resource_name = sys.argv[1] | |
| pickle_name = sys.argv[2] | |
| jsonl_name = sys.argv[3] | |
| entries = list(entry_queries.all_entries(resource_name, expand_plugins=False)) | |
| with open(pickle_name, "wb") as file: | |
| pickle.dump(entries, file) | |
| with open(jsonl_name, "w") as file: | |
| for entry in entries: | |
| json.dump(entry.dict(), file) | |
| file.write("\n") | |
Xet Storage Details
- Size:
- 425 Bytes
- Xet hash:
- 6b75b0b42f381c894bf2fa4569409f4626d7b3f86a39b54037b09da1455caf1b
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.