You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

notebook.ipynb 1.0 kB

10 months ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. {
  2. "cells": [
  3. {
  4. "cell_type": "code",
  5. "execution_count": null,
  6. "metadata": {},
  7. "outputs": [],
  8. "source": [
  9. "import IPython.display\n",
  10. "from dora import Node\n",
  11. "from IPython.display import clear_output"
  12. ]
  13. },
  14. {
  15. "cell_type": "code",
  16. "execution_count": null,
  17. "metadata": {},
  18. "outputs": [],
  19. "source": [
  20. "\n",
  21. "node = Node(\"plot\")\n"
  22. ]
  23. },
  24. {
  25. "cell_type": "code",
  26. "execution_count": null,
  27. "metadata": {},
  28. "outputs": [],
  29. "source": [
  30. "\n",
  31. "for event in node:\n",
  32. " if event[\"type\"] != \"INPUT\":\n",
  33. " continue\n",
  34. " data = event[\"value\"].to_numpy()\n",
  35. " IPython.display.display(IPython.display.Image(data=data))\n",
  36. " clear_output(wait=True)"
  37. ]
  38. }
  39. ],
  40. "metadata": {
  41. "kernelspec": {
  42. "display_name": "base",
  43. "language": "python",
  44. "name": "python3"
  45. },
  46. "language_info": {
  47. "name": "python",
  48. "version": "3.10.13"
  49. }
  50. },
  51. "nbformat": 4,
  52. "nbformat_minor": 2
  53. }