Upload folder using huggingface_hub
Browse files- examples/README.md +49 -0
examples/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Examples — How to use this Transparency Pack
|
| 2 |
+
|
| 3 |
+
These examples are **anonymized** and intended for **validation + audit workflow demos**.
|
| 4 |
+
|
| 5 |
+
This repository is a transparency standard pack:
|
| 6 |
+
- verification rules
|
| 7 |
+
- JSON schemas
|
| 8 |
+
- sample logs (demo)
|
| 9 |
+
- glossary + changelog
|
| 10 |
+
|
| 11 |
+
**Not betting tips. Not financial advice. No hype. Just logs.**
|
| 12 |
+
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
## Example files
|
| 16 |
+
- `sample_signal_log.json` — a minimal anonymized signal log example
|
| 17 |
+
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
## Validate a sample log against the schema
|
| 21 |
+
|
| 22 |
+
1) Locate the schema in this repo
|
| 23 |
+
Typical path (example): `datasets/signal-log.schema.json`
|
| 24 |
+
|
| 25 |
+
Run from repo root (so the relative paths resolve).
|
| 26 |
+
|
| 27 |
+
2) Install a JSON schema validator (pick one)
|
| 28 |
+
|
| 29 |
+
Python (jsonschema)
|
| 30 |
+
```bash
|
| 31 |
+
python -m pip install jsonschema
|
| 32 |
+
python - << 'PY'
|
| 33 |
+
import json
|
| 34 |
+
from jsonschema import validate
|
| 35 |
+
|
| 36 |
+
with open("datasets/signal-log.schema.json","r",encoding="utf-8") as f:
|
| 37 |
+
schema = json.load(f)
|
| 38 |
+
|
| 39 |
+
with open("examples/sample_signal_log.json","r",encoding="utf-8") as f:
|
| 40 |
+
data = json.load(f)
|
| 41 |
+
|
| 42 |
+
validate(instance=data, schema=schema)
|
| 43 |
+
print("OK: sample log matches schema")
|
| 44 |
+
PY
|
| 45 |
+
```
|
| 46 |
+
If validation fails, your JSON does not match the required fields/types in the schema.
|
| 47 |
+
Check the `required` fields in the schema and update `sample_signal_log.json` accordingly.
|
| 48 |
+
|
| 49 |
+
(Windows users: run the Python snippet in a `.py` file instead of heredoc.)
|