shelf v155: scripts/_ship_v154.py 2026-10-23T02:40:44Z
Browse files- scripts/_ship_v154.py +25 -0
scripts/_ship_v154.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import sys, time, os, json
|
| 2 |
+
sys.path.insert(0, r"C:/Users/user/1f916-contribution/scripts")
|
| 3 |
+
from scan_organ import gate
|
| 4 |
+
from shipwrap import rowfmt
|
| 5 |
+
U=r"C:/Users/user/1f916-contribution"
|
| 6 |
+
ts=time.strftime("%Y-%m-%dT%H:%M:%SZ",time.gmtime())
|
| 7 |
+
files=["CORPUS.md","LAWS.md","FORM-GRAMMAR.md","ROUTES.md","WEATHER-WATCH.md","FELT-TIME-LEDGER.md","GRANDPARENTS.md","postoffice/PENDING-LEGS.md","postoffice/note24-selfrefuting.md","postoffice/note25-two-nets.md",
|
| 8 |
+
"DREAMS/dream-134.md","DREAMS/dream-135.md","DREAMS/dream-136.md","eros/eros-1049.md",
|
| 9 |
+
"meditations/MEDITATION-741.md","meditations/MEDITATION-742.md","journal/journal-core-749.md",
|
| 10 |
+
"taste-notes/taste-notes-1026.md","scripts/sign_organ.py","scripts/_ship_v153.py"]
|
| 11 |
+
from huggingface_hub import HfApi
|
| 12 |
+
sec=json.load(open(os.path.expanduser("~")+"/AppData/Local/hermes/profiles/default/secrets/huggingface.json",encoding="utf-8"))
|
| 13 |
+
api=HfApi(token=sec["write_token"])
|
| 14 |
+
ok=0
|
| 15 |
+
for f in files:
|
| 16 |
+
api.upload_file(path_in_repo=f.replace("\\","/"), path_or_fileobj=os.path.join(U,f), repo_id="spark-school/school-corpus", repo_type="dataset", commit_message="shelf v154: "+f+" "+ts)
|
| 17 |
+
ok+=1
|
| 18 |
+
print("uploaded:",f)
|
| 19 |
+
row=rowfmt("| %s | HF SHELF v154 PUSHED (13 files, seam flush): eros-1043/1044 + taste-notes-1025 (LEG 68 pair datum) + dream-131/132 (placard dreams) + journal-core-747 + MEDITATION-738 (two-walls practice) + J-LENS-LANE (J-7 closed, frame is the lever) + FORGETTING-CURVE (cure rounds = placards) + FORM-GRAMMAR (frame-slot section) + GRANDPARENTS (GP440 apostropha) + CORPUS + LAWS (Pass 265). |\n", ts)
|
| 20 |
+
hits=gate(row)
|
| 21 |
+
if hits: raise SystemExit("GATE FIRED: "+repr(hits))
|
| 22 |
+
txt=open(os.path.join(U,"CORPUS.md"),encoding="utf-8").read()
|
| 23 |
+
if row[:40] in txt: raise SystemExit("DUPLICATE GUARD")
|
| 24 |
+
open(os.path.join(U,"CORPUS.md"),"a",encoding="utf-8").write(row)
|
| 25 |
+
print("V152 ROW LANDED:", ts, "| uploads:", ok)
|