shaico111 commited on
Commit
97a6ab5
·
verified ·
1 Parent(s): d31bf3b

Add files using upload-large-folder tool

Browse files
.gitignore CHANGED
@@ -1,5 +1,8 @@
1
  upload_to_hf.py
 
 
2
  .cursor/
 
3
 
4
  # Repo-specific scratch/outputs
5
  .tmp-space/
@@ -7,8 +10,6 @@ cs26-portal/
7
 
8
  # Python
9
  __pycache__/
10
- *.py[cod]
11
- *.pyd
12
  .Python
13
  .venv/
14
  venv/
 
1
  upload_to_hf.py
2
+ upload_space.py
3
+ .tmp-space
4
  .cursor/
5
+ logo.svg
6
 
7
  # Repo-specific scratch/outputs
8
  .tmp-space/
 
10
 
11
  # Python
12
  __pycache__/
 
 
13
  .Python
14
  .venv/
15
  venv/
README.md ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CS26 — Computer-Science Dataset + Portal
2
+
3
+ This repo contains:
4
+
5
+ - **A Hugging Face Dataset**: `CS26/Computer-Science`
6
+ - **A Hugging Face Space (portal)**: `CS26/cs26-portal` (Gradio)
7
+
8
+ The portal is live at:
9
+
10
+ - Direct app URL: `https://cs26-cs26-portal.hf.space/`
11
+ - Space page: `https://huggingface.co/spaces/CS26/cs26-portal`
12
+
13
+ ## Authentication (no tokens in repos)
14
+
15
+ Do **not** hardcode any `hf_...` tokens in code or commit them to git.
16
+
17
+ Use the Hugging Face CLI to store your token **locally**:
18
+
19
+ ```powershell
20
+ hf auth login --force
21
+ hf auth whoami
22
+ ```
23
+
24
+ This stores credentials in your user profile cache and lets `huggingface_hub` authenticate automatically.
25
+
26
+ ## Portal (Space) — `cs26-portal/app.py`
27
+
28
+ Features:
29
+
30
+ - **RTL + Hebrew UI** (including mixed Hebrew / Latin in search headings)
31
+ - Folder navigation with breadcrumbs
32
+ - **Stateful refresh and deep links**: current folder is stored in the **`?path=`** query string (URL-encoded), with **`#`** kept in sync for refresh-friendly navigation, plus a **`localStorage`** copy for resilience
33
+ - Search within current folder subtree
34
+ - File actions on click:
35
+ - **PDF**: downloads immediately
36
+ - **ZIP/archives**: download immediately
37
+ - **Office (doc/docx/ppt/pptx)**: opens OfficeApps viewer in a **new tab**, and shows a preview pane with “הורדה” + “תצוגה (Office)”
38
+ - **Images**: in-page preview + download link
39
+ - **Text/code (txt/c/...)**: in-page preview + download link
40
+ - **Prepare Folder ZIP**: builds a ZIP from the dataset via `snapshot_download` / temp zip; status and errors are shown in a **status** markdown area next to the download widget
41
+ - **Direct Hugging Face downloads**: filenames with Hebrew (or other non-ASCII) may still appear percent-encoded in some browsers when downloading straight from `huggingface.co` URLs; the app uses best-effort `<a download>` where applicable
42
+
43
+ ### Deploy the Space
44
+
45
+ From repo root:
46
+
47
+ ```powershell
48
+ python .\upload_space.py
49
+ ```
50
+
51
+ ### Troubleshooting
52
+
53
+ - **Search shows nothing**: search is scoped to the **current folder subtree**; navigate into a year or topic folder first, or clear the search box and use **רענון** after changing folders.
54
+ - **ZIP errors or long waits**: large folders download many files from Hugging Face first; watch the status markdown under the ZIP button for progress or a Python traceback if something fails.
55
+ - **Blank preview for images**: raster previews are embedded as data URIs when needed; if something still fails, use the dataset **resolve** link from the preview panel.
56
+
57
+ ## Dataset uploader — `upload_to_hf.py`
58
+
59
+ Uploads the local folder to the dataset repo **in batches of 10 files** with retry/resume.
60
+
61
+ It excludes:
62
+
63
+ - `.git/**`
64
+ - `cs26-portal/**`
65
+ - `upload_to_hf.py`, `upload_space.py`
66
+
67
+ Run:
68
+
69
+ ```powershell
70
+ python .\upload_to_hf.py
71
+ ```
72
+
73
+ Optional environment variables:
74
+
75
+ - `HF_REPO_ID` (default `CS26/Computer-Science`)
76
+ - `HF_LOCAL_FOLDER` (default `c:\GitRepos\Computer-Science`)
77
+ - `HF_BATCH_SIZE` (default `10`)
78
+ - `HF_RETRY_SLEEP_SECONDS` (default `5`)
79
+
80
+ ## Rollback safety
81
+
82
+ Local repo has:
83
+
84
+ - tag: `backup-before-portal-fixes`
85
+ - branch: `backup/current-state`
86
+
87
+ Space repo has:
88
+
89
+ - tag: `backup-before-portal-fixes`
90
+ - branch: `backup/current-state`
91
+ - tag: `latest` pointing at current `main` HEAD
92
+
favicon_io/android-chrome-192x192.png ADDED

Git LFS Details

  • SHA256: 34af0897c2133fc9f0e34e2f155d4cb54e79f591f64b96e0b672c4c090572ace
  • Pointer size: 129 Bytes
  • Size of remote file: 9.01 kB
favicon_io/android-chrome-512x512.png ADDED

Git LFS Details

  • SHA256: 0258d8a826e328511a7412179122e735e6284217bb5c969b483c80ea7156f600
  • Pointer size: 130 Bytes
  • Size of remote file: 36.4 kB
favicon_io/apple-touch-icon.png ADDED

Git LFS Details

  • SHA256: 0d3ba6c9fb765b032248b09984b74722ccde2c2cfc29a89a09c61d80657b204b
  • Pointer size: 129 Bytes
  • Size of remote file: 7.95 kB
favicon_io/favicon-16x16.png ADDED

Git LFS Details

  • SHA256: c37d035dbfc06a491bfcd2de3f365a10b4d3c6006951cd6db6821b9dca63de77
  • Pointer size: 128 Bytes
  • Size of remote file: 406 Bytes
favicon_io/favicon-32x32.png ADDED

Git LFS Details

  • SHA256: 9363155c2b205514dfbf79c621396cdce024a2a0070f685a0ac2d4baa75aa736
  • Pointer size: 128 Bytes
  • Size of remote file: 877 Bytes
favicon_io/favicon.ico ADDED
favicon_io/site.webmanifest ADDED
@@ -0,0 +1 @@
 
 
1
+ {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
logo.svg ADDED
שנה ב/סמסטר א/אלגוריתמים 1/מבחנים/2026/מועד ב 2026 מבחן באלגוריתמים 1 מעודכן.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:754aaa837c43fc009898a4feb665d4b66ec9aa4ce2d098be979d3b02f4fdb43b
3
+ size 436230
שנה ב/סמסטר א/מבוא למדעי הנתונים - שיטות וכלים/מבחנים + קבצים עם שאלות חזרה/2026/מועד ב תשפו סמסטר א.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7dccba9b57ef82f1e500106265200113b95f9a0b0d125e490225956566a53aa7
3
+ size 157515