Skip to content

Instantly share code, notes, and snippets.

import marimo
__generated_with = "0.15.2"
app = marimo.App(width="full")
@app.cell
def _():
import gwsurrogate
import sxs
@moble
moble / named_characters.py
Last active June 16, 2025 19:12
Download and extract named characters from the Wolfram Language documentation and generate a dictionary mapping those names to their Unicode representations
"""
This script downloads and extracts named characters from the Wolfram
Language documentation and generates a dictionary mapping those names
to their Unicode representations. The named characters are available
at
https://reference.wolfram.com/language/guide/ListingOfNamedCharacters.html
Not all named characters have a direct Unicode equivalent, in which
import marimo
__generated_with = "0.11.17"
app = marimo.App(
width="medium",
app_title="SXS Catalog",
css_file="custom.css",
)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@threads for j ∈ eachindex(𝒯.R)
Rⱼ = 𝒯.R[j]
αⱼ = real(𝒯.α[j])
ð̄²α = real(𝒯.ð̄²α[j])
κ⁻¹ = γ * (1 - v⃗ ⋅ Rⱼ(𝐤))
spline = @view 𝒯.splines[:, :, j]
guess = firstindex(𝒯.u)
for (i, u′) ∈ enumerate(𝒯.u′)
u = κ⁻¹ * u′ + αⱼ
d, guess = interpolate(𝒯.u, 𝒯.h, spline, u, guess)
#%%
"""
This script shows how to load CCE data into a `scri.AsymptoticBondiData` object
and evaluate a set of constraints that should be satisfied involving the strain
and the Newman-Penrose quantities (assuming the waveform is in Bondi gauge).
These constraints are listed in the plot legend (see below) as equations to be
satisfied at each instant. The violation is just one side minus the other, and
the norm is that difference squared integrated over the sphere (and
square-rooted).
"""
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@moble
moble / doi2bibtex.sh
Created December 13, 2023 17:13
doi2bibtex
# This bash/zsh function queries for the input DOI's bibtex entry. When the DOI points
# to a journal article, this usually resolves to the journal's own bibtex output.
doi2bibtex () {
curl -fsSLH "Accept: application/x-bibtex" "https://doi.org/$1" | sed -e 's|%2F|/|g'
}