import "hub:ozziegooen/sTest" as sTest @hide test = sTest.test @hide expect = sTest.expect @hide describe = sTest.describe @hide styleSquiggleCode(code) = "
/* SIMPLE PPE COST-EFFECTIVENESS MODEL I thought that the old cost-effective model relied too much on a tower of fake assumptions, and I wanted something that was simpler and easier to intuit. This new model assumes that there's a certain amount of x-risk that's addressable with PPE alone. This risk exists because we either 1) don't have enough effective PPE in stock to protect everyone quickly, 2) we can't produce enough effective PPE to protect everyone quickly, or 3) both. The amount of this PPE-addressable x-risk that's *actually* addressed is a function of two things: how much we increase PPE stocks, and how much we increase PPE production capacity. To capture this, I use an OR function: 100% of the PPE-addressable risk has been reduced when: - We have 8B units of PPE OR - We're able to produce 8B units of PPE per day
// WIP: don't take these numbers literally /* MODELING THE COST-EFFECTIVENESS OF PPE INTERVENTIONS Changelog from sheets version: - assuming flex production only fully realized at the end (step func vs continuous) - production lag and flex lag moved into one - new lines are a multiple of flex production */
export autoTable(data) = { keys = List.flatten(data) -> map(Dict.keys) -> List.flatten -> List.uniq Table.make( data, { columns: keys -> map({|key| { name: key, fn: {|f| f[key]} }}) } ) } @showAs(autoTable)
// This model estimates the number of real monthly active users across all blockchains // by creating a table of the top 10 blockchains and their estimated user bases import "hub:ozziegooen/sTest" as sTest @name("Top 10 Blockchains and Other") @doc("Estimated user bases and real user percentages for major blockchains") blockchains = [ { name: "Bitcoin", users: 2M to 6M, real_percentage: 85% to 95% }, { name: "Ethereum", users: 1.5M to 4M, real_percentage: 75% to 90% },
/* This calculator estimates how many ice cream scoops it would take to scoop out the entire moon. The model considers different scoop sizes and accounts for uncertainties in measurements. Results: - For a medium-sized scoop, it would take approximately 2.3e25 scoops to empty the moon. - This number is surprisingly large, highlighting the vast difference in scale between everyday objects and celestial bodies. - The calculation demonstrates the importance of using distributions to account for uncertainties in both scoop and moon volumes. */
import "hub:ozziegooen/sTest" as sTest // This code models and projects the percentages of different AI chip market segments in 2030. // It includes estimates for data center inference, optical accelerators, and memristor-based in-memory computing. // The code creates a calculator with key inputs and displays function plots from now until 2030. @doc("Calculates market share percentage over time") marketShareProjection(initialShare, growthRate, maxShare, year) = { share = initialShare * (1 + growthRate) ^ (year - 2023) min([share, maxShare]) }
// This model estimates the number of people looking at themselves in the mirror at any given moment globally. // It considers global population, time of day, and typical mirror-viewing habits. import "hub:ozziegooen/sTest" as sTest // ===== Inputs ===== @name("Global Population (2023)") @doc("Estimate of the global population in 2023") global_population = 7.8B to 8B