Spaces:
Running
Running
Download study-path.js from Vikingdude81/ai-math-studio: direct link, hf CLI and curl.
- Browser
- Download file 13.3 kB
-
https://huggingface.co/spaces/Vikingdude81/ai-math-studio/resolve/main/study-path.js
- Command line
-
hf download hf://spaces/Vikingdude81/ai-math-studio/study-path.js
-
curl -L -o study-path.js https://huggingface.co/spaces/Vikingdude81/ai-math-studio/resolve/main/study-path.js
13.3 kB
| ; | |
| const groups=[...new Set(topics.map(t=>t.group))]; | |
| const notes=[ | |
| ['General Math 2 · p. 1','The printed equation is false as a numerical claim.','The PDF prints 15^(3/4) = 8. Its formal logarithmic rewrite would be log₁₅(8) = 3/4, but that equality is also false: 15^(3/4) ≈ 7.622. The practice generator uses true equalities instead.'], | |
| ['General Math 7–8 · p. 2','State the domain.','a⁰ = 1 assumes a ≠ 0 in elementary algebra. Likewise x⁴/x⁹ = x⁻⁵ = 1/x⁵ requires x ≠ 0.'], | |
| ['Calculus 4 · p. 2','The placement of dx makes the integrand ambiguous.','Read literally, ∫6x⁵ dx − 12x² + 8 becomes x⁶ − 12x² + 8 + C. If the intended integrand is the entire polynomial, ∫(6x⁵ − 12x² + 8) dx = x⁶ − 4x³ + 8x + C. The exercises explicitly group the whole integrand.'], | |
| ['Calculus 5 · p. 3','Check which variables actually occur.','The complicated first term contains no x₃. Wherever the original expression is defined, its partial derivative with respect to x₃ is zero. The remaining term gives ∂f/∂x₃ = 5x₁x₄, so at (a,b,c,d) the result is 5ad.'], | |
| ['Statistics 3 · p. 5','Set names change the answer.','If A literally means solid chocolate and B means caramel-containing candy, A ∩ B is empty. If A is intended to mean all chocolate-containing candies, the intersection consists of the 4 chocolate-covered caramels. Both readings are explained; the app states the categories explicitly.'], | |
| ['Statistics 5 · pp. 5–6','Some matching definitions overlap or are imprecise.','Categorical, nominal and qualitative overlap. Discrete values can be countably infinite, not only finite. Continuous measurements may be bounded; they need not cover an infinite range. Interval scales have meaningful equal differences without an absolute zero; ratio scales add a meaningful zero.'], | |
| ['Statistics 6–7 · p. 6','A dataset alone does not determine features and outcomes.','The menu contains 5 columns: 2 categorical labels and 3 numeric measurements. Calling them independent or dependent variables requires a stated prediction or study question. This app explicitly defines a target before asking for features.'], | |
| ['Programming 2–3 · pp. 8–9','Distinguish pseudocode from Python, and fix errors intentionally.','The inclusive 0-to-6 loop does not access array[6] because the guarded read runs only at indices 0 and 3; its sum is 5 + 1 = 6. Python range(6) covers valid indices 0 through 5. The screenshot’s “if x == 10” needs a colon. A missing import may require a correct name or environment, not blindly installing an arbitrary name.'], | |
| ['Programming 4 · pp. 10–12','The 2D plot and classifier use different representations.','The PDF plots two PCA coordinates but trains Gaussian Naive Bayes on the original digit features. Its shown accuracy is about 0.8378 for one split. Overlap in the plot alone cannot prove inseparability in all original dimensions.'], | |
| ['APA 7 · p. 7','Student and professional paper rules differ.','A student title page is standard. Student papers normally omit the running head unless an instructor requests it; professional papers include one. The app checks these distinctions against official APA guidance.'] | |
| ]; | |
| function setView(view){$('practiceView').hidden=view!=='practice';$('mapView').hidden=view!=='map';$('readinessView').hidden=view!=='readiness';document.querySelectorAll('[data-view]').forEach(b=>b.classList.toggle('active',b.dataset.view===view));if(view==='map')renderMap();if(view==='readiness')renderReadiness()} | |
| document.querySelectorAll('[data-view]').forEach(b=>b.onclick=()=>setView(b.dataset.view)); | |
| function renderMap(){ | |
| $('mapView').innerHTML=`<div class="map-intro"><div class="eyebrow">YOUR PDF → A STUDY PATH</div><h2>MS-AAI self-assessment companion</h2><p>Practice the concepts in your February 2026 USD self-assessment. This is an independently built study aid, not an official answer key or a prediction of admission readiness.</p><a href="sources/USD-MSAAI-self-assessment-Feb2026.pdf" target="_blank" rel="noopener">Open the original 15-page PDF ↗</a></div><div class="map-grid">${groups.map(g=>`<section class="card"><h3>${esc(g)}</h3>${topics.filter(t=>t.group===g).map(t=>`<button class="map-topic" data-start="${t.id}"><span><b>${esc(t.name)}</b><small>${esc(t.source)}</small><small>${t.variants.map(esc).join(' · ')}</small></span><span>→</span></button>`).join('')}</section>`).join('')}<section class="card"><h3>Online readiness & time management</h3><p>PDF pp. 13–15 · Reflect on independent learning, teamwork and available time. These are personal reflections with no right or wrong answers.</p><button class="btn primary-btn" id="openPlanner">Open readiness & planner →</button></section></div><section class="card source-notes"><div class="eyebrow">READ THE QUESTION CAREFULLY</div><h3>Clarifications in the source document</h3><p>These notes distinguish the literal wording from reasonable interpretations. Ask your instructor about intended wording where necessary.</p>${notes.map(([ref,title,detail])=>`<details><summary><span>${esc(ref)}</span>${esc(title)}</summary><p>${esc(detail)}</p></details>`).join('')}</section><section class="card"><h3>Worked anchors from the PDF</h3><p>Use these checks after trying the original questions. New practice in the studio uses varied examples of the same concepts.</p><details><summary>General math & probability</summary><div class="anchor-grid"><p><b>Logarithm:</b> log₂(8) = 3 because 2³ = 8.</p><p><b>Counting:</b> 6! = 720 arrangements; C(10,3) = 120 topping selections.</p><p><b>Sets:</b> A ∩ B = {3,4,5,6,7}; A ∪ B = {2,3,4,5,6,7,8}.</p><p><b>Slope:</b> (8−2)/(−4−(−2)) = 6/(−2) = −3.</p><p><b>Exactly 2 heads:</b> C(3,2)/2³ = 3/8.</p><p><b>Goggles and caps:</b> P(union)=1−0.60=0.40; overlap=0.20+0.30−0.40=0.10.</p><p><b>Red face card:</b> 2 suits × 3 ranks / 52 = 3/26.</p><p><b>Independent union:</b> 0.3+0.5−(0.3×0.5)=0.65.</p></div></details><details><summary>Calculus & linear algebra</summary><div class="anchor-grid"><p><b>Quotient derivative:</b> d[x²/(4−x)]/dx = (8x−x²)/(4−x)², x≠4.</p><p><b>Limit:</b> 2x²−17x+8=(x−8)(2x−1). Dividing by 8−x gives −(2x−1) for x≠8. Limit at 8: −15.</p><p><b>Chain rule:</b> d[(2y²+y)³]/dy = 3(2y²+y)²(4y+1).</p><p><b>Eigenvalues:</b> det(A−λI)=λ²+λ−42=(λ+7)(λ−6); λ=−7,6.</p><p><b>Eigenvectors:</b> A[−3,1]ᵀ=−7[−3,1]ᵀ; A[1,4]ᵀ=6[1,4]ᵀ.</p><p><b>Transpose:</b> Bᵀ has rows [2,3,4], [3,6,5], [4,7,9].</p><p><b>Matrix sum:</b> C+D has rows [3,1,10], [3,12,9], [1,13,3].</p><p><b>Matrix product:</b> [[1,2],[3,4]][[−2,3],[4,5]] = [[6,13],[10,29]].</p><p><b>Transpose identity:</b> AᵀBᵀ=(BA)ᵀ is true for compatible shapes.</p><p><b>Subsets:</b> V, X and Y contain only members of A. X equals A, which is allowed for a subset.</p><p><b>L2 norm:</b> √(100+4+64+25+16)=√209≈14.45683.</p></div></details><details><summary>Statistics & programming</summary><div class="anchor-grid"><p><b>Median:</b> The middle values are 5 and 7; (5+7)/2 = 6.</p><p><b>Statistical definitions:</b> Mean→d, mode→a, range→b, median→e, variance→f, standard deviation→c. The variance description uses the population convention.</p><p><b>p=0.03, α=0.05:</b> Reject H₀ at this threshold, under the test’s assumptions. This is not a 3% probability that H₀ is true.</p><p><b>Branch trace:</b> n>m is false, then m≥10 is false; x becomes 7.</p><p><b>Loop trace:</b> Only indices 0 and 3 contribute; sum=5+1=6.</p><p><b>Error matching:</b> a→iv (numeric intent), b→ii (only if the intended package exists), c→v, d→iii, e→i. More robust alternatives are discussed in the debugging lessons.</p></div></details></section><section class="card"><h3>Reference links</h3><p>Primary APA guidance used for the writing lessons:</p><ul><li><a href="https://apastyle.apa.org/style-grammar-guidelines/citations/basic-principles/author-date" target="_blank" rel="noopener">Author–date citations</a></li><li><a href="https://apastyle.apa.org/style-grammar-guidelines/paper-format/title-page" target="_blank" rel="noopener">Student and professional title pages</a></li><li><a href="https://apastyle.apa.org/style-grammar-guidelines/paper-format/page-header" target="_blank" rel="noopener">Page headers and running heads</a></li></ul><small>Original assessment supplied by you; page references use its printed page numbers. Official APA guidance checked October 26, 2026.</small></section>`; | |
| document.querySelectorAll('[data-start]').forEach(b=>b.onclick=()=>{selectTopic(b.dataset.start);$('topicTitle').scrollIntoView({behavior:'smooth',block:'start'})});$('openPlanner').onclick=()=>setView('readiness'); | |
| } | |
| const reflectionItems=[['motivation','I can maintain motivation and work independently.'],['time','I can protect regular study time alongside other commitments.'],['deadlines','I can set deadlines and turn in work on time.'],['teamwork','I can communicate and contribute reliably in a remote team.'],['format','I can learn from readings, videos, practice and online discussion.'],['help','When stuck, I can research, ask for help and keep trying.'],['tools','I can use an editor or notebook, version control and Markdown.']]; | |
| let planner={hours:{},reflections:{},tasks:{},notes:''};try{const old=JSON.parse(localStorage.getItem('ai-math-readiness-v1')||'null');if(old)planner={...planner,...old}}catch{} | |
| const days=['Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday','Monday']; | |
| function savePlanner(){try{localStorage.setItem('ai-math-readiness-v1',JSON.stringify(planner));$('plannerStatus').textContent='Saved in this browser.'}catch{$('plannerStatus').textContent='Storage is unavailable; changes last only for this session.'}} | |
| function renderReadiness(){ $('readinessView').innerHTML=`<div class="map-intro"><div class="eyebrow">PDF PP. 13–15 · PERSONAL REFLECTION</div><h2>Make room for the work</h2><p>There is no readiness score here. Use your answers to decide what support and study habits you want in place.</p></div><div class="planner-grid"><section class="card"><h3>Weekly study time</h3><p>Enter realistic hours for readings, practice, projects and teamwork. The PDF uses a Tuesday-to-Monday week; confirm actual deadlines in your course.</p><div class="week-grid">${days.map(d=>`<label>${d}<input type="number" min="0" max="24" step="0.25" data-day="${d}" value="${Number(planner.hours[d])||0}" aria-label="${d} study hours"></label>`).join('')}</div><div class="week-total"><strong id="weeklyTotal">0</strong> hours / week</div><p>This is your availability, not an official workload requirement.</p><label class="notes-label">Your next study action<textarea id="planNotes" placeholder="Example: Tuesday — review logarithms, then solve five problems.">${esc(planner.notes||'')}</textarea></label><p id="plannerStatus" role="status">Saved in this browser.</p></section><section class="card"><h3>Readiness reflections</h3>${reflectionItems.map(([id,label])=>`<label class="reflection">${esc(label)}<select data-reflect="${id}" aria-label="${esc(label)}"><option value="">Not answered</option>${['Yes','Not yet','Unsure'].map(v=>`<option${planner.reflections[id]===v?' selected':''}>${v}</option>`).join('')}</select></label>`).join('')}<div class="hint" id="reflectionAdvice"></div></section></div><section class="card"><h3>Three practical preparation tasks</h3><div class="task-list">${[['notebook','Notebook / editor','Create a short calculation notebook or script. Restart the environment and reproduce the result.'],['git','Git / GitHub','Make a small repository, commit one meaningful change, and inspect its diff and history.'],['readme','Markdown','Write a README with purpose, setup, inputs, run instructions, and limitations.']].map(([id,title,body])=>`<label><input type="checkbox" data-task="${id}"${planner.tasks[id]?' checked':''}><span><b>${title}</b><small>${body}</small></span></label>`).join('')}</div><p>These checkboxes are self-reports; the app does not access your editor or repositories.</p></section>`; | |
| function totals(){const vals=days.map(d=>Number(planner.hours[d])||0);$('weeklyTotal').textContent=fmt(vals.reduce((a,b)=>a+b,0));const needs=reflectionItems.filter(([id])=>['Not yet','Unsure'].includes(planner.reflections[id]));$('reflectionAdvice').textContent=needs.length?'Choose one uncertain area and define a small next action. You can use the study map for technical topics, or adjust your schedule and support plan.':'Reflect honestly and revisit this plan as your course schedule becomes clearer.'} | |
| document.querySelectorAll('[data-day]').forEach(el=>el.oninput=()=>{const n=Number(el.value);if(!Number.isFinite(n)||n<0||n>24){el.setCustomValidity('Use a number from 0 to 24.');el.reportValidity();return}el.setCustomValidity('');planner.hours[el.dataset.day]=n;totals();savePlanner()});document.querySelectorAll('[data-reflect]').forEach(el=>el.onchange=()=>{planner.reflections[el.dataset.reflect]=el.value;totals();savePlanner()});document.querySelectorAll('[data-task]').forEach(el=>el.onchange=()=>{planner.tasks[el.dataset.task]=el.checked;savePlanner()});$('planNotes').oninput=e=>{planner.notes=e.target.value;savePlanner()};totals();} | |