Skip to content

Instantly share code, notes, and snippets.

@tonyfast
tonyfast / generate-alt-text.ipynb
Created August 19, 2021 00:26
using templates to generate alt text for figures in matplotib
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tonyfast
tonyfast / index.js
Created April 11, 2024 20:19
my first sonification
// https://hf.co/chat/r/8qoS6Gb
// Set up the Web Audio API context and create an oscillator node
audioCtx = new (window.AudioContext || window.webkitAudioContext)();
oscillator = audioCtx.createOscillator();
yourArray = [1,2,3,3,2,1]
// Calculate the range of pitches to use
minVal = Math.min(...yourArray);
maxVal = Math.max(...yourArray);
@tonyfast
tonyfast / first_and_second_laws_of_thermodynamics.ipynb
Last active January 10, 2024 21:04
a notebook with revised literate pidgy cells for the first part of thermodyamics course
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tonyfast
tonyfast / jinja-magic.ipynb
Last active December 22, 2023 17:04
Jinja2 DictLoader example in an IPython notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
class ACT(Exception): ...
class EN_301_549(Exception): ...
class EN_9_1_1_1(Exception): ...
class EN_9_1_2_2(Exception): ...
class EN_9_1_3_1(Exception): ...
class EN_9_1_4_1(Exception): ...
class EN_9_1_4_2(Exception): ...
class EN_9_1_4_3(Exception): ...
class EN_9_1_4_4(Exception): ...
class EN_9_2_1_1(Exception): ...
@tonyfast
tonyfast / BinaryExamples.ipynb
Last active November 2, 2023 21:05
a revision of a pycalphad documentation page as literate program.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{"name":"lorenz-executed","role":"document","actions":[],"value":"","nodeCssSelector":"","nodeType":9,"description":"","keyboardShortcut":"","childCount":3,"indexInParent":0,"states":["readonly","focusable","opaque","enabled","sensitive"],"children":[{"name":null,"role":"landmark","actions":[],"value":"","nodeCssSelector":".site","nodeType":1,"description":"","keyboardShortcut":"","childCount":2,"indexInParent":0,"states":["selectable text","opaque","enabled","sensitive"],"children":[{"name":" ","role":"text leaf","actions":[],"value":"","nodeCssSelector":".site#text","nodeType":3,"description":"","keyboardShortcut":"","childCount":0,"indexInParent":0,"states":["opaque","enabled","sensitive"],"children":[],"attributes":{"explicit-name":"true"}},{"name":"Skip to content","role":"link","actions":["Jump"],"value":"https://iota-school.github.io/notebooks-for-all/branch/extent/exports/html/lorenz-executed-smol.html#/","nodeCssSelector":".visually-hidden","nodeType":1,"description":"","keyboardShortcut":"","childCo
@tonyfast
tonyfast / README.md
Last active February 21, 2023 22:35
extensible notebook schemas

an extensible schema for computational notebooks and cells

currently the notebook schema contains intrinsic notebook schema properties and application specific definitions. it would be good to separate the pure schema information from the application specific schema into something extensible. this document explores core set of definitions that can extended to either a traditional notebook container or a streaming lines format.

a notebook is a collection of cells that can be contained in different ways.

the defs schema is reused to demonstrate different top level schema. its purpose is to make cell schema and cell metadata schema extensible.

@tonyfast
tonyfast / 2021-testing-in-notebooks.ipynb
Last active February 9, 2023 22:21 — forked from ericdatakelly/2021-testing-in-notebooks.ipynb
an essay on the value and implementation of formal unit testing in jupyter notebooks
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.