File tree Expand file tree Collapse file tree 1 file changed +21
-20
lines changed
projects/math/numerical-linalg/notebooks Expand file tree Collapse file tree 1 file changed +21
-20
lines changed Original file line number Diff line number Diff line change 3232(def video-path
3333 " notebooks/movie/Video_003.mp4" )
3434
35- (kind/video
36- {:src video-path})
35+ ; ; A conveneince function for displaying a video
36+ ; ; in Quarto (till we handle this better in
37+ ; ; an upcoming Clay release):
38+ (defn video [path]
39+ (kind/md
40+ (str " {{"
41+ \<
42+ " video "
43+ path
44+ \>
45+ " }}" )))
46+
47+ (video video-path)
3748
3849; ; Let us explore it with clj-media:
3950
@@ -138,10 +149,13 @@ first-image
138149 ((flat-tensors i) j))
139150 :uint8 ))
140151
141- ; ; For visual conveniene, we will display it transposed:
142- (-> long-tensor
143- (tensor/transpose [1 0 ])
144- bufimg/tensor->image)
152+ (kind/hiccup
153+ [:div
154+ [:h3 " It is interesting to scroll this! 👇" ]
155+ [:div {:style {:max-height " 400px"
156+ :overflow :auto }}
157+ (bufimg/tensor->image
158+ long-tensor)]])
145159
146160; ; ## Singular value decomposition
147161
@@ -296,17 +310,4 @@ first-image
296310 (clj-media/make-media frame-format generated-frames)
297311 target-path)
298312
299- (kind/video
300- {:src target-path})
301-
302-
303-
304-
305-
306-
307-
308-
309-
310-
311-
312-
313+ (video target-path)
You can’t perform that action at this time.
0 commit comments