Instructions to use jonl521/modeling_simple with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jonl521/modeling_simple with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("jonl521/modeling_simple", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download .venv/lib/python3.14/site-packages/mpmath/functions/signals.py from jonl521/modeling_simple: direct link, hf CLI and curl.
- Browser
- Download file 703 Bytes
-
https://huggingface.co/jonl521/modeling_simple/resolve/main/.venv/lib/python3.14/site-packages/mpmath/functions/signals.py
- Command line
-
hf download hf://jonl521/modeling_simple/.venv/lib/python3.14/site-packages/mpmath/functions/signals.py
-
curl -L -o signals.py https://huggingface.co/jonl521/modeling_simple/resolve/main/.venv/lib/python3.14/site-packages/mpmath/functions/signals.py
703 Bytes
| from .functions import defun_wrapped | |
| def squarew(ctx, t, amplitude=1, period=1): | |
| P = period | |
| A = amplitude | |
| return A*((-1)**ctx.floor(2*t/P)) | |
| def trianglew(ctx, t, amplitude=1, period=1): | |
| A = amplitude | |
| P = period | |
| return 2*A*(0.5 - ctx.fabs(1 - 2*ctx.frac(t/P + 0.25))) | |
| def sawtoothw(ctx, t, amplitude=1, period=1): | |
| A = amplitude | |
| P = period | |
| return A*ctx.frac(t/P) | |
| def unit_triangle(ctx, t, amplitude=1): | |
| A = amplitude | |
| if t <= -1 or t >= 1: | |
| return ctx.zero | |
| return A*(-ctx.fabs(t) + 1) | |
| def sigmoid(ctx, t, amplitude=1): | |
| A = amplitude | |
| return A / (1 + ctx.exp(-t)) | |