Skip to content

Instantly share code, notes, and snippets.

View capnfabs's full-sized avatar

Fabian Tamp capnfabs

View GitHub Profile
@capnfabs
capnfabs / mbdata.sql
Created February 20, 2023 12:58
SQL for exploring musicbrainz data
-- grabbed this from a migration somewhere; it's populated by db triggers AFAICT
INSERT INTO release_first_release_date (
SELECT DISTINCT ON (release)
release, date_year, date_month, date_day
FROM (
SELECT release, date_year, date_month, date_day
FROM release_country
UNION ALL
SELECT release, date_year, date_month, date_day
FROM release_unknown_country
@capnfabs
capnfabs / sensitivity.cs
Created April 22, 2020 15:29
A super quick example of running a Sensitivity Analysis
PerturbAndObserveRunner<Complex> runner = new PerturbAndObserveRunner<Complex>(new OpenDSSSimulator());
runner.NetworkFilename = "network.dss";
//adjust everything for single phase/3-phase
var numphases = Phase != 0 ? 1 : 3;
var phases = Phase != 0 ? ("."+Phase+".0"): "";
// The {0}, {1}... arguments here will be populated with values from PerturbElementValuesSelector.
runner.PerturbCommands = new String[] { "new Generator.{0} bus1={1}"+phases+" phases="+numphases+" model=1 status=fixed kV={2} Vminpu=0.5 Vmaxpu=2 kW={3} kvAR=0" };
@capnfabs
capnfabs / log.txt
Created May 6, 2018 12:51
flutter error log
Launching lib/main.dart on iPhone X in debug mode...
Skipping compilation. Fingerprint match.
Xcode build done.
flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
flutter: The following assertion was thrown building Text("potato"):
flutter: A RenderViewport expected a child of type RenderSliver but received a child of type RenderParagraph.
flutter: RenderObjects expect specific types of children because they coordinate with their children during
flutter: layout and paint. For example, a RenderSliver cannot be the child of a RenderBox because a
flutter: RenderSliver does not understand the RenderBox layout protocol.
flutter: