Skip to content

Update about python figure #305

Open

Description

Activity

  1. mmcky commented on Mar 26, 2026

    @mmcky
    Contributor

    Notes on updating the PyTorch vs MATLAB figure

    The current figure (lectures/_static/lecture_specific/about_py/pytorch_vs_matlab.png) is a screenshot from Stack Overflow Trends showing monthly % of SO questions for pytorch vs matlab tags.

    How to update

    1. Visit https://trends.stackoverflow.co/?tags=pytorch,matlab
    2. If the chart loads, right-click the chart image → Save As (or screenshot and crop)
    3. Save to lectures/_static/lecture_specific/about_py/pytorch_vs_matlab.png

    Current blocker

    As of 2026-03-26, the SO Trends API backend (/api/trends/) is returning HTTP 500 errors, so the chart doesn't render. This appears to be an ongoing outage on Stack Overflow's side.

    Alternative approaches if the outage persists

    • Stack Exchange Data Explorer (SEDE): Run a SQL query at data.stackexchange.com to get monthly tag counts as % of total questions, then plot with matplotlib. Example query:

      SELECT
        DATEFROMPARTS(YEAR(p.CreationDate), MONTH(p.CreationDate), 1) AS Month,
        t.TagName,
        COUNT(*) AS TagCount
      FROM Posts p
      JOIN PostTags pt ON p.Id = pt.PostId
      JOIN Tags t ON pt.TagId = t.Id
      WHERE t.TagName IN ('pytorch', 'matlab')
      GROUP BY DATEFROMPARTS(YEAR(p.CreationDate), MONTH(p.CreationDate), 1), t.TagName
      ORDER BY Month, t.TagName
    • Stack Exchange API with key: Register an app at stackapps.com to get 10,000 req/day (vs 300 unauthenticated). A script at scripts/update_so_trends.py exists but exhausts the unauthenticated quota before finishing (~400 requests needed).

    What else needs updating

    The existing figure data goes through ~mid-2025. The text in about_py.md around the figure is fine — just the PNG needs refreshing with current data.

  2. added
    maintenanceHousekeeping: refactors, tooling, infra, style, env upkeep
    on Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenanceHousekeeping: refactors, tooling, infra, style, env upkeep

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions