kolibril13 commited on
Commit
558db4a
·
1 Parent(s): b5e9575
Files changed (1) hide show
  1. pages/01_wave_packet.ipynb +34 -18
pages/01_wave_packet.ipynb CHANGED
@@ -2,13 +2,13 @@
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
- "execution_count": 3,
6
  "metadata": {},
7
  "outputs": [
8
  {
9
  "data": {
10
  "application/vnd.jupyter.widget-view+json": {
11
- "model_id": "254146bc22234e29a1264be57ad4ae49",
12
  "version_major": 2,
13
  "version_minor": 0
14
  },
@@ -24,26 +24,17 @@
24
  }
25
  ],
26
  "source": [
27
- "# import bpy\n",
28
- "from IPython.display import display, Image\n",
29
- "\n",
30
- "\n",
31
- "\n",
32
  "import solara\n",
33
- "import numpy as np\n",
34
  "\n",
35
- "float_value = solara.reactive(0)\n",
36
  "\n",
37
  "@solara.component\n",
38
  "def Page():\n",
39
- " path = \"test.png\"\n",
40
- " # bpy.context.scene.render.resolution_x = 500\n",
41
- " # bpy.context.scene.render.resolution_y = 200\n",
42
- " # bpy.ops.render.render()\n",
43
- " # bpy.data.images[\"Render Result\"].save_render(filepath=path)\n",
44
- " display(Image(filename=path))\n",
45
- "\n",
46
- "\n",
47
  "Page()"
48
  ]
49
  },
@@ -52,7 +43,32 @@
52
  "execution_count": null,
53
  "metadata": {},
54
  "outputs": [],
55
- "source": []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  }
57
  ],
58
  "metadata": {
 
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
+ "execution_count": 7,
6
  "metadata": {},
7
  "outputs": [
8
  {
9
  "data": {
10
  "application/vnd.jupyter.widget-view+json": {
11
+ "model_id": "f2ad65b5721742d89805015291a8a2e2",
12
  "version_major": 2,
13
  "version_minor": 0
14
  },
 
24
  }
25
  ],
26
  "source": [
 
 
 
 
 
27
  "import solara\n",
 
28
  "\n",
29
+ "turbo_boost = solara.reactive(True)\n",
30
  "\n",
31
  "@solara.component\n",
32
  "def Page():\n",
33
+ " solara.Checkbox(label=\"Turbo boost\", value=turbo_boost)\n",
34
+ " if turbo_boost.value:\n",
35
+ " solara.Success(\"Turbo boost is on\")\n",
36
+ " else:\n",
37
+ " solara.Warning(\"Turbo boost is off, you might want to turn it on\")\n",
 
 
 
38
  "Page()"
39
  ]
40
  },
 
43
  "execution_count": null,
44
  "metadata": {},
45
  "outputs": [],
46
+ "source": [
47
+ "# # import bpy\n",
48
+ "# from IPython.display import display, Image\n",
49
+ "\n",
50
+ "\n",
51
+ "\n",
52
+ "# import solara\n",
53
+ "# import numpy as np\n",
54
+ "\n",
55
+ "# turbo_boost = solara.reactive(True)\n",
56
+ "\n",
57
+ "\n",
58
+ "# @solara.component\n",
59
+ "# def Page():\n",
60
+ "# path = \"test.png\"\n",
61
+ "# # bpy.context.scene.render.resolution_x = 500\n",
62
+ "# # bpy.context.scene.render.resolution_y = 200\n",
63
+ "# # bpy.ops.render.render()\n",
64
+ "# # bpy.data.images[\"Render Result\"].save_render(filepath=path)\n",
65
+ "# # display(Image(filename=path))\n",
66
+ "\n",
67
+ "# print(\"Hello World\")\n",
68
+ "# checkbox = solara.Checkbox(label=\"Turbo boost\", value=turbo_boost)\n",
69
+ "\n",
70
+ "# Page()"
71
+ ]
72
  }
73
  ],
74
  "metadata": {