(execute-reply-content status execution-count)
(execute-reply-content status
execution-count
{:keys [ename evalue traceback] :as opts})
(execute-request-content code
allow-stdin?
silent?
stop-on-error?
store-history?)
(execute-result-content data execution-count)
(execute-result-content data execution-count {:keys [metadata]})
(frames->jupmsg check-signature frames)
Returns a map representing a Jupyter message. frames
must be a sequential collection of
byte-arrays consisting of a
Returns a map representing a Jupyter message. `frames` must be a sequential collection of byte-arrays consisting of a
(history-request-content)
(history-request-content {:keys [output? raw? hist-access-type session start
stop pattern unique?]})
(input-request-content prompt)
(input-request-content prompt password?)
(insert-paths jupyter-message path-value-map)
Returns the result of inserting into jupyter-message
values from vals in path-value-map
at the
point specified by their keys. path-value-map
must be a map from paths to values and all paths
must refer to insertion points in either maps or vectors.
Example:
(let [pred #(and (int? %) (odd? %))
replfn (constantly :replaced)
value {:a 1, :b [0 1 [1 2 3 {:x [1]}]]}
[result paths] (leaf-paths pred replfn value)]
[(= value (insert-paths result paths)) ;; <-- The point of leaf-paths
and insert-paths
result paths])
;; =>
[true
{:a :replaced, :b [0 :replaced [:replaced 2 :replaced {:x [:replaced]}]]}
{[:a] 1, [:b 1] 1, [:b 2 0] 1, [:b 2 2] 3, [:b 2 3 :x 0] 1}]
NOTE: The implementation does NOT work correctly for any Clojure value; it is specialised to handle Jupyter messages which are losslessly serializable to JSON. Paths can only refer to insertion points in vectors and maps.
Returns the result of inserting into `jupyter-message` values from vals in `path-value-map` at the point specified by their keys. `path-value-map` must be a map from paths to values and all paths must refer to insertion points in either maps or vectors. Example: (let [pred #(and (int? %) (odd? %)) replfn (constantly :replaced) value {:a 1, :b [0 1 [1 2 3 {:x [1]}]]} [result paths] (leaf-paths pred replfn value)] [(= value (insert-paths result paths)) ;; <-- The point of `leaf-paths` and `insert-paths` result paths]) ;; => [true {:a :replaced, :b [0 :replaced [:replaced 2 :replaced {:x [:replaced]}]]} {[:a] 1, [:b 1] 1, [:b 2 0] 1, [:b 2 2] 3, [:b 2 3 :x 0] 1}] NOTE: The implementation does NOT work correctly for any Clojure value; it is specialised to handle Jupyter messages which are losslessly serializable to JSON. Paths can only refer to insertion points in vectors and maps.
(inspect-request-content code cursor-pos)
(inspect-request-content code cursor-pos {:keys [details?]})
(jupmsg->frames signer
{:keys [header parent-header metadata content preframes buffers]
:as jupmsg})
(kernel-info-reply-content protocol-version)
(kernel-info-reply-content protocol-version
{:keys [banner clj-ver help-links implementation
version-string]})
(kernelrsp->jupmsg port kernel-rsp)
(kernelrsp->jupmsg port
{:keys [rsp-content rsp-msgtype rsp-socket rsp-metadata
rsp-buffers req-message]}
{:keys [messageid now] :as opts})
(leaf-paths pred f v)
Recursively traverses v
replacing elements for which pred
returns a truthy value with the
result of applying f
to the elements. Returns a 2-tuple of the result of the replacements and a
map of paths to the replaced elements.
NOTE: The implementation does NOT work correctly for any Clojure value; it is specialised to handle Jupyter messages which are losslessly serializable to JSON. Extraction only occurs from vectors and maps.
Recursively traverses `v` replacing elements for which `pred` returns a truthy value with the result of applying `f` to the elements. Returns a 2-tuple of the result of the replacements and a map of paths to the replaced elements. NOTE: The implementation does NOT work correctly for any Clojure value; it is specialised to handle Jupyter messages which are losslessly serializable to JSON. Extraction only occurs from vectors and maps.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close