Skip to content

Instantly share code, notes, and snippets.

View agoose77's full-sized avatar
🏠
Working from home

Angus Hollands agoose77

🏠
Working from home
View GitHub Profile
# See docs at: https://mystmd.org/guide/frontmatter
version: 1
project:
plugins:
- type: executable
path: table-plugin.py
site:
template: book-theme
@agoose77
agoose77 / table-plugin.mjs
Created January 31, 2025 11:14
A plugin to highlight table cells starting with particular substrings
const COLOURS = {
"positively charged": "#CBE4F9",
"negatively charged": "#CDF5F6",
"polar uncharged": "#EFF9DA",
hydrophobic: "#F9EBDF",
"hydrophobic and aromatic": "#F9D8D6",
special: "#D6CDEA",
};
const plugin = {
This file has been truncated, but you can view the full file.
#!/usr/bin/env node
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value;
var __esm = (fn, res) => function __init() {
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"type": "object",
"oneOf": [
{
"$ref": "#/$defs/jb-article-format"
},
{
"$ref": "#/$defs/jb-book-format"
},
{
@agoose77
agoose77 / flake.nix
Last active March 21, 2025 12:44
Python virtualenvironment flake
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = inputs @ {
self,
nixpkgs,
flake-utils,
...
@agoose77
agoose77 / guide.md
Created January 30, 2024 13:36
Running regolith (sway) on an Nvidia GPU
  1. Build patched wlroots
    • Online there are patches that touch wlr_output_preferred_read_format and gles2_bind_buffer
  2. LD_PRELOAD this patched object in the launcher before invoking sway-regolith: sudo $EDITOR $(which regolith-session-wayland)
  3. Enable nvidia_drm.modeset=1
  4. set XDG_CURRENT_DESKTOP=sway in ~/.config/environment.d such that screensharing works.

jupytext: formats: ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc,.myst.md:myst text_representation: extension: '.md' format_name: myst format_version: '0.7' jupytext_version: 1.4.0+dev kernelspec: display_name: Python 3

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# https://gist.github.com/agoose77/e1567e9c7ee328c2da9b2a81dc9c1c7d
from __future__ import annotations
from collections.abc import Iterator
import awkward_katai as ak_ka
import awkward as ak