Skip to content

Instantly share code, notes, and snippets.

<html>
<head>
<title>Plotly.js Simple Example</title>
<!-- Include Plotly.js library from a CDN -->
<script src="https://cdn.plot.ly/plotly-3.3.0.min.js"> </script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-svg-full.js"> </script>
</head>
<body>
<!-- Div element where the plot will be rendered -->
@j-fu
j-fu / mwex.jl
Created December 10, 2025 18:23
### A Pluto.jl notebook ###
# v0.20.21
using Markdown
using InteractiveUtils
# ╔═╡ 74b77b64-3123-4a55-86b9-71d2af2448d9
md"""
f: ``x^3``
"""
import Base
using Test
struct Grid
_components::Dict{DataType, Any}
end
function makecomponent(x, g)
return nothing
end
@j-fu
j-fu / MWE_DI.jl
Created October 21, 2025 21:36
MWE for issue with SCT+Nonlinear solve
module MWE_DI
using DifferentiationInterface
using NonlinearSolve
using SparseConnectivityTracer
using SparseMatrixColorings
struct System{Tprep}
X::Vector{Float64}
jac_prep::Tprep
@j-fu
j-fu / h5dump.txt
Created May 20, 2025 14:11
h5dump of good jld2
HDF5 "stuff-release.jld2" {
GROUP "/" {
GROUP "_types" {
DATATYPE "00000001" H5T_COMPOUND {
H5T_STRING {
STRSIZE H5T_VARIABLE;
STRPAD H5T_STR_NULLPAD;
CSET H5T_CSET_UTF8;
CTYPE H5T_C_S1;
} "name";
@j-fu
j-fu / jdl2mwe1.jl
Created May 20, 2025 12:49
JDL2 MWE
using JLD2
abstract type AbstractStuffType end
struct Stuff1 <: AbstractStuffType end
struct Stuff2 <: AbstractStuffType end
struct Stuff3 <: AbstractStuffType end
const UnionStuff=Union{Type{Stuff1}, Type{Stuff2}, Type{Stuff3}}
function runtest()
@j-fu
j-fu / Zed.log
Last active November 28, 2024 09:43
vulkaninfo
2024-11-27T14:56:17.919595829+01:00 [INFO] ========== starting zed ==========
2024-11-27T14:56:17.959449939+01:00 [WARN] Failed to load a font face 0 from '/usr/share/fonts/texlive-helmholtz-ellis-ji-notation/HEJI2Text.otf' cause font doesn't have a family name.
2024-11-27T14:56:17.983465741+01:00 [WARN] failed to load font 'FandolBraille-Display'
2024-11-27T14:56:17.983905234+01:00 [WARN] failed to load font 'FandolBraille-Regular'
2024-11-27T14:56:17.986809082+01:00 [WARN] failed to load font 'FandolBraille-Display'
2024-11-27T14:56:17.986834542+01:00 [WARN] failed to load font 'FandolBraille-Regular'
2024-11-27T14:56:17.990051933+01:00 [INFO] Compositor detection: _NET_WM_CM_S?=false, _NET_WM_CM_OWNER=false, _NET_SUPPORTING_WM_CHECK=true
2024-11-27T14:56:17.990079377+01:00 [INFO] x11: compositor present: true, gtk_frame_extents_supported: true
2024-11-27T14:56:17.99426613+01:00 [INFO] Try connect ibus
2024-11-27T14:56:17.998786096+01:00 [INFO] perform;
"""
force_update_notebook_environment(notebook)
Forced update of notebook environment to all newest versions of the packages.
`Pluto.update_notebook_environment(notebook)` heeds
the compat entries in the Project.toml and thus seems to do nothing.
"""
function force_update_notebook_environment(notebook)
# cache the current environment
thisproject=Pkg.project().path
@j-fu
j-fu / gist:1fd2a044636cf0a2737b999db043cc22
Created February 13, 2024 17:05
Pluto on nightly 38065a40994
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.11.0-DEV.1586 (2024-02-13)
_/ |\__'_|_|_|\__'_| | Commit 38065a40994 (0 days old master)
|__/ |
@j-fu
j-fu / plutojs.jl
Created November 14, 2023 12:51
Test notebook for javscript based graphics in pluto
### A Pluto.jl notebook ###
# v0.19.32
using Markdown
using InteractiveUtils
# ╔═╡ a5b79b24-82e3-11ee-3de1-03c823a7e0f8
using PlutoUI
# ╔═╡ 819e486d-c27b-4542-8c1d-8740720e8586