Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 38d89fd

Browse files
author
Yun Rock Qu
authoredOct 7, 2020
polish notebooks (#1147)
1 parent 8a02f20 commit 38d89fd

File tree

2 files changed

+13
-23
lines changed

2 files changed

+13
-23
lines changed
 

‎boards/ZCU104/notebooks/common/zcu104_pmbus.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"cell_type": "markdown",
6363
"metadata": {},
6464
"source": [
65-
"As can be seen, the keys of the dictionary are the names of the voltage rails while the values are `Rail` objects which contain three sensors for the voltage, current and power. Due to limitations of the regulators used on the ZCU104 the resolution of most of the power railes are only to 1/8 W.\n",
65+
"As can be seen, the keys of the dictionary are the names of the voltage rails while the values are `Rail` objects which contain three sensors for the voltage, current and power. Due to limitations of the regulators used on the ZCU104 the resolution of most of the power rails are only to 1/8 W.\n",
6666
"\n",
6767
"To see how power changes under CPU load we can use the `DataRecorder` class. For this example we are going to look at total board power as we load one of the CPU cores in Python."
6868
]

‎pynq/notebooks/arch/aarch64/common/display_port_introduction.ipynb

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@
3232
{
3333
"cell_type": "code",
3434
"execution_count": 2,
35-
"metadata": {
36-
"collapsed": true
37-
},
35+
"metadata": {},
3836
"outputs": [],
3937
"source": [
4038
"displayport = DisplayPort()\n",
@@ -58,7 +56,7 @@
5856
"name": "stdout",
5957
"output_type": "stream",
6058
"text": [
61-
"Took 10.022847414016724 seconds at 59.863228004540275 FPS\n"
59+
"Took 10.003438472747803 seconds at 59.97937625493172 FPS\n"
6260
]
6361
}
6462
],
@@ -81,7 +79,9 @@
8179
"cell_type": "markdown",
8280
"metadata": {},
8381
"source": [
84-
"It's far more exciting though to show an image from a webcam. We can do this using OpenCV. First we need to instantiate the `VideoCapture` device and set the resolution to match our frame."
82+
"It's far more exciting though to show an image from a webcam. We can do this using OpenCV. First we need to instantiate the `VideoCapture` device and set the resolution to match our frame.\n",
83+
"\n",
84+
"For the next cell, make sure you have a webcam plugged into one of the USB ports."
8585
]
8686
},
8787
{
@@ -125,21 +125,22 @@
125125
"name": "stdout",
126126
"output_type": "stream",
127127
"text": [
128-
"Took 27.602270126342773 seconds at 10.868671258806682 FPS\n"
128+
"Took 22.52149271965027 seconds at 6.660304530752672 FPS\n"
129129
]
130130
}
131131
],
132132
"source": [
133+
"number_frames = 150\n",
133134
"start = time.time()\n",
134135
"\n",
135-
"for _ in range(300):\n",
136+
"for _ in range(number_frames):\n",
136137
" frame = displayport.newframe()\n",
137138
" capture.read(frame)\n",
138139
" displayport.writeframe(frame)\n",
139-
" \n",
140+
"\n",
140141
"end = time.time()\n",
141142
"duration = end - start\n",
142-
"print(f\"Took {duration} seconds at {300 / duration} FPS\")"
143+
"print(f\"Took {duration} seconds at {number_frames / duration} FPS\")"
143144
]
144145
},
145146
{
@@ -152,23 +153,12 @@
152153
{
153154
"cell_type": "code",
154155
"execution_count": 6,
155-
"metadata": {
156-
"collapsed": true
157-
},
156+
"metadata": {},
158157
"outputs": [],
159158
"source": [
160159
"capture.release()\n",
161160
"displayport.close()"
162161
]
163-
},
164-
{
165-
"cell_type": "code",
166-
"execution_count": null,
167-
"metadata": {
168-
"collapsed": true
169-
},
170-
"outputs": [],
171-
"source": []
172162
}
173163
],
174164
"metadata": {
@@ -187,7 +177,7 @@
187177
"name": "python",
188178
"nbconvert_exporter": "python",
189179
"pygments_lexer": "ipython3",
190-
"version": "3.6.0"
180+
"version": "3.6.5"
191181
}
192182
},
193183
"nbformat": 4,

0 commit comments

Comments
 (0)
Failed to load comments.