Jio

Pasted Dec 5, 2026, 1:25 AM1 file62 lines

Scan to open on your phone

Point a camera at the QR code - it opens this exact paste, no app needed.

https://codepastes.com/zzgrnyefwkqnmvxb
untitled
1# pip install matplotlib numpy  (also needs ffmpeg installed for MP4)
2import numpy as np, matplotlib.pyplot as plt
3from matplotlib.animation import FuncAnimation, FFMpegWriter
4 
5plt.xkcd()  # <-- the hand-drawn "sketch" look!
6 
7TODAY, DAYS = 296.40, 100
8WALL, BEAR_END, BASE_END, BULL_END = 305.64, 268, 330, 375
9EVENTS = {24: "Q3 RESULTS\n(mid-Jan)", 38: "BUDGET\n(Feb 2)", 90: "Q4 SEASON\n(Apr)"}
10 
11def path_to(end, seed, vol=0.012):
12    """Random walk 'bridged' so it lands exactly on the scenario target."""
13    rng = np.random.default_rng(seed)
14    r = rng.normal(0, vol, DAYS + 1); r[0] = 0
15    w = np.cumsum(r)
16    drift = np.log(end / TODAY) * np.arange(DAYS + 1) / DAYS
17    return TODAY * np.exp(w - w[-1] * np.arange(DAYS + 1) / DAYS + drift)
18 
19base, bull, bear = path_to(BASE_END, 7), path_to(BULL_END, 3, .015), path_to(BEAR_END, 11, .013)
20 
21fig, ax = plt.subplots(figsize=(11, 6.2), dpi=120)
22fig.patch.set_facecolor("#f7f3e9"); ax.set_facecolor("#f7f3e9")
23ax.set_xlim(0, DAYS + 8); ax.set_ylim(255, 385)
24ax.set_title("JIOFIN :  The 100-Day Sketch", fontsize=20)
25ax.set_xlabel("trading days"); ax.set_ylabel("price (INR)")
26ax.axhline(WALL, ls="--", c="#888")
27ax.text(1, WALL + 2, "200-DAY WALL  ₹305", fontsize=11, color="#555")
28ax.axhline(280, ls=":", c="#888"); ax.text(1, 273, "support ₹280", fontsize=10, color="#555")
29 
30l, = ax.plot([], [], lw=3, color="#1a6b3c")                    # base line (drawn live)
31dot, = ax.plot([], [], "o", ms=9, color="#1a6b3c")
32ticker = ax.text(0, 0, "", fontsize=16, weight="bold")
33flags, cone = [], ax.fill_between([], [], [], color="#1a6b3c", alpha=.12)
34tag = ax.text(DAYS + 1, BASE_END, "", fontsize=15, weight="bold", va="center")
35 
36def update(f):
37    d = min(f, DAYS)
38    l.set_data(np.arange(d + 1), base[:d + 1])
39    dot.set_data([d], [base[d]])
40    ticker.set_position((d * 0.4 + 2, base[d] + 4))
41    ticker.set_text(f"Day {d}\n₹{base[d]:.0f}")
42    if d in EVENTS and f <= DAYS:
43        fl = ax.text(d, base[d] - 9, "⚡ " + EVENTS[d], ha="center",
44                     fontsize=10, color="#b30000",
45                     bbox=dict(boxstyle="round,pad=.3", fc="#fff", ec="#b30000"))
46        flags.append(fl)
47    if f > DAYS:  # reveal the cone of all three futures
48        ax.fill_between(np.arange(DAYS + 1), bear, bull, color="#1a6b3c", alpha=.12)
49        ax.plot(np.arange(DAYS + 1), bull, lw=2, ls="--", color="#2e7d32")
50        ax.plot(np.arange(DAYS + 1), bear, lw=2, ls="--", color="#c62828")
51        tag.set_text("🚀 ₹375  |  🎯 ₹330  |  🐻 ₹268\n(sketch, not a promise!)")
52    return l, dot, ticker
53 
54fps, secs = 15, 16                                    # ~7s draw + hold, then cone reveal
55anim = FuncAnimation(fig, update, frames=int(fps * secs) + 30, interval=1000 / fps, blit=False)
56try:
57    anim.save("jiofin_100day_sketch.mp4", FFMpegWriter(fps=fps))
58    print("Saved jiofin_100day_sketch.mp4")
59except Exception:
60    anim.save("jiofin_100day_sketch.gif", writer="pillow", fps=fps)
61    print("Saved GIF (install ffmpeg for MP4)")

3,111 chars · codepastes.com