How to Contribute
Standard operating procedure for adding new learning modules.
1. The Content Pattern
To ensure high quality and consistency, every new topic topic must follow this strict structure. This allows multiple agents to collaborate seamlessly.
Required Section Structure
- Concept Introduction: A brief, clear explanation of the concept.
-
Mathematical Equation: LaTeX formatted equation in a
math-blockdiv. -
"Read as" Explanation: A plain English pronunciation guide for the equation in a
p.equation-read-astag. -
ML/AI Relevance: Explain how the math works on data.
- Important: Do not just name-drop algorithms (e.g., "Used in A/B Testing"). Explain the mechanism (e.g., "It calculates significance by comparing X and Y...").
- Assume the reader is a beginner. Explain why this tool is necessary.
-
Code Implementation: Runnable Python code example.
- Must include
# Library: [Name]comment. -
Must include explicit imports (e.g.,
import numpy as np).
- Must include
2. HTML Template Snippet
Copy and paste this snippet for each new section:
<!-- ================= TOPIC NAME ================= -->
<section id="topic-id">
<h2>1. Topic Name</h2>
<p>Brief definition of the concept.</p>
<!-- Math Block -->
<div class="math-block">$$ E = mc^2 $$</div>
<!-- Read As Guide -->
<p class="equation-read-as">
"Energy equals mass times the speed of light squared."
</p>
<h3>Why is this used in ML?</h3>
<p>
Explanation of relevance to algorithms or data processing.
</p>
<h3>Code Implementation</h3>
<pre><code class="language-python">
# Library: Numpy
import numpy as np
# Clear, runnable example using variables passed from backend
result = np.array([1, 2, 3])
# Result:
</code></pre>
</section>
3. Backend Integration
For the code execution to be valid, you must implement the logic in
app/routes.py.
Steps:
- Define a new route
@main.route('/your-new-page'). - Perform calculations (e.g., using Scipy/Numpy) inside the route function.
-
Pass the calculated results to the
render_templatecall. - Search Indexing: Add your new page to the `pages` dictionary in `get_or_build_index()` function to enable search.