{
  "nbformat": 4,
  "nbformat_minor": 5,
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "name": "python",
      "version": "3.12"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {},
      "id": "intro",
      "source": "# 重启后暴露隐藏依赖\n本站手写参考，不是Jupyter AI输出。"
    },
    {
      "cell_type": "code",
      "id": "cell-0",
      "metadata": {},
      "execution_count": null,
      "outputs": [],
      "source": "total = sum(r[\"minutes\"] for r in readings)\nprint(total)"
    },
    {
      "cell_type": "code",
      "id": "cell-1",
      "metadata": {},
      "execution_count": null,
      "outputs": [],
      "source": "import csv\nwith open(\"readings.csv\") as source:\n readings=[{\"device_id\":r[\"device_id\"],\"minutes\":int(r[\"minutes\"])} for r in csv.DictReader(source)]"
    },
    {
      "cell_type": "code",
      "id": "cell-2",
      "metadata": {},
      "execution_count": null,
      "outputs": [],
      "source": "print(\"mean\",total/len(readings))"
    }
  ]
}
