Skip to content

Instantly share code, notes, and snippets.

View lispandfound's full-sized avatar
🪤
Caught in Mouse Trap

Jake Faulkner lispandfound

🪤
Caught in Mouse Trap
  • QuakeCoRE
  • Christchurch, New Zealand
  • 16:52 (UTC +12:00)
View GitHub Profile
PUZ 000 dt=0.02
8410 2.00000e-02 0 0 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00
-4.84283e-14 -4.83667e-14 -4.83051e-14 -4.82436e-14 -4.81821e-14 -4.81207e-14
-4.80594e-14 -4.79981e-14 -4.79368e-14 -4.78756e-14 -4.78145e-14 -4.77533e-14
-4.76923e-14 -4.76313e-14 -4.75703e-14 -4.75094e-14 -4.74486e-14 -4.73877e-14
-4.73270e-14 -4.72663e-14 -4.72056e-14 -4.71450e-14 -4.70844e-14 -4.70239e-14
-4.69635e-14 -4.69031e-14 -4.68427e-14 -4.67824e-14 -4.67221e-14 -4.66619e-14
-4.66017e-14 -4.65416e-14 -4.64815e-14 -4.64215e-14 -4.63615e-14 -4.63016e-14
-4.62417e-14 -4.61819e-14 -4.61221e-14 -4.60624e-14 -4.60027e-14 -4.59431e-14
-4.58835e-14 -4.58240e-14 -4.57645e-14 -4.57051e-14 -4.56457e-14 -4.55864e-14
@lispandfound
lispandfound / slip.py
Created January 13, 2025 21:49
Slip Distribution Code
import numpy as np
import matplotlib.pyplot as plt
# Parameters
def von_karman_transfer(field, L, dx, H=0.75):
# Get field dimensions
ny, nx = field.shape
kx = np.fft.fftfreq(nx, d=dx) * 2 * np.pi # Wavenumbers in x
ky = np.fft.fftfreq(ny, d=dx) * 2 * np.pi # Wavenumbers in y
@lispandfound
lispandfound / test.py
Created June 6, 2025 04:44
GMT Basics
#!/usr/bin/env python
import typer
from pathlib import Path
from typing import NamedTuple
import numpy as np
# NOTE: You need both! of these packages
# pip install typer pygmt "git+https://github.com/ucgmsim/pygmt_helper.git" (or conda, mamba, whatever)
import pygmt
@lispandfound
lispandfound / find_references
Created January 7, 2026 00:35
Find references to removed qcore functions
#!/bin/bash
FUNCTIONS=("_check_data_empty" "_check_data_exists" "_validate_pad" "_validate_sos" "a_to_mw_berrymanetal" "a_to_mw_hanksbakun" "a_to_mw_leonard" "a_to_mw_skarlatoudis" "a_to_mw_strasser_2010_interface" "a_to_mw_villamoretal" "acc2vel" "add_buffer_handler" "add_general_file_handler" "allen_bounds" "argsearch" "build_corners" "check_type" "clean_up_logger" "closest_points_between_line_segments" "closest_points_between_plane_sequences" "closest_points_between_planes" "compute_intermediate_latitudes" "create_constant_vm_file" "create_stdout_handler" "duplicate_handlers" "get_IM_csv" "get_IM_info" "get_VM_dir" "get_area" "get_basic_logger" "get_bb_acc_dir" "get_bb_bin_path" "get_bb_dir" "get_bounds" "get_cybershake_list" "get_database_path" "get_empirical_dir" "get_fault_VM_dir" "get_fault_qp_file" "get_fault_qs_file" "get_genslip_bin" "get_hf_acc_dir" "get_hf_bin_path" "get_hf_binmod" "get_hf_dir" "get_hf_np2mm" "get_hypo" "get_im_plot_dir" "get_length" "get_lf_bin" "get_lf_dir" "get_lf_outbin_dir" "
@lispandfound
lispandfound / gantt.py
Created January 26, 2026 03:08
A CLI tool to generate Gantt charts from simulation run CSVs.
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.14"
# dependencies = [
# "pandas",
# "matplotlib",
# "cyclopts",
# ]
# ///