• Monday

    • LCH’s annual list of hedge fund perf has citadel at #1, estimating >16B in profit. This is the largest ever, by any fund. And it was in 2022 when most were red.
    • Google lays off ~12k. Big.
    • Duck is ~$20/lb.
    • Got a ticket for Meet the Breeds on sunday.
    • You can nest defaultdicts in python, of course.
    • Matt Levine posted about Elon today! What a shocker!
    • Opening vegas lines are chiefs -1.5 eagles -2.5. I’m picking niners bengals.
      • So far, I have gotten every wild card round and divisional round pick correct except vikings (9 out of 10).
      • And then niners over bengals in superbowl (simply cannot bet against).
      • So if the remaining 3 matches hit, I’ll be 12/13 for NFL postseason.
      • And if you count standard bracket points exponentially (1 for wild card winner correct, 2 for divisional winner correct, 4 for conf winner correct, 8 for superbowl winner correct), then that’s 13/14 points right now, and would be 29/30 points if niners beat bengals in superbowl.
    • Uninstalled the rainbow brackets extension, it’s built into vscode natively now.
    • Tilde version requirements: “3.8.*” is the same as “~3.8” – it will allow everything up to 3.9. (whereas “^3.1234514325.5412315” just means up to the next version of the leftmost nonzero digit, so anything up until major version 4).
    • Looked into making the supercontest leaderboard tables sortable. Using bootstrap 4, can do with datatables. Will just require a little bit of an upgrade. I’ll probably create another ticket for this.
    • SBSC. Created the alltime leaderboard: https://gitlab.com/bmahlstedt/supercontest/-/issues/170.
  • Sunday

    • (includes saturday)
    • Liquid death is at 700M: https://www.youtube.com/watch?v=mTOlIWSEexM. It’s water!
    • 9 Olympian muses: Calliope (epic poetry), Clio (history), Erato (erotic poetry), Euterpe (lyric poetry), Melpomene (tragedy), Polyhymnia (hymns), Terpsichore (dancing), Thalia (comedy), Urania (astronomy).
      • Calliope was the lead, of course. She’s the mother of Orpheus.
    • All the usual mealprep. Pb, bars, powders, liver, rice, oat milk.
    • To make puffed rice: Boil normally, spread on tray (oil or parchment paper) and bake for about 2hr at 250 to dry, and then fry in oil (only takes about 10sec).
      • You can do ONLY the bake part and not the fry; this leaves smaller crunchier dry rice (still useful for certain things) rather than the puffed out standard version.
    • NFL divisional round done (got all 4 picks correct!), UFC, dubs/nets (minus kd).
      • Watched niners at commissioner in brooklyn (same as last year).
    • An “adam’s apple” is just cartilage that protects your larynx. Men and women both have them. It’s just less cartilage for women.
    • SBSC. Added a convenient little function to give a copy-paste-able list of all emails for all paid players for a season.
  • Friday

    • We have a $31.4T debt ceiling (congress controls this, and raises every year-ish). Like a country LoC at 100% draw. We’ve never defaulted on our debt, but do hit the ceiling every couple years (on avg). When that happens, we pipe cashflow away from some less critical govt funds and sell some govt investments. Countries (federal governments) have credit ratings, just like companies and individuals, and they’re assigned by US agencies to determine creditworthiness.
    • Lots of private work.
    • SBSC.
      • https://gitlab.com/bmahlstedt/supercontest/-/issues/169
      • Full restructuring of the results module. Basically left the views as simple as possible, just some conditioning logic then oneliner calls to results.
      • Moved all clientside calculation to serverside. Python now generates the LB views (previously it passed half the raw data to the frontend, which run some calculations, and calculated the other half serverside to pass it directly).
      • The LB is composed of 3 returns now: the main columns (points per week per user), the rollup cols per user (season record, points, pick percentage, rank, payout), and the leaguewide row on top (pick percentages per week and overall season).
      • Added the payout column. Logser at p=0.9 with some cute rounding.
      • Also shows party fund and weekly prizes.
  • Thursday

    • Genesis filing bankruptcy.
    • Private work.
    • DePIN = decentralized physical infrastructure networks.
    • NBA trade deadline is Feb 9.
    • SQLalchemy.
      • Remember sqlalchemy relationships. One-one, many-one, one-many are all “back populating” relationships. Just places foreign keys so a column matches another table. Can be unidirectional or bidirectional. The many-many case requires an association table. This can just be a simple table with 2 cols, id FK for the first association and id FK for the second association. Or you can make the logic more complicated.
      • These relationships at the ORM level allow you to query on back-populated properties. I can query on User.leagues in python, for example (in psql you cannot query users.leagues, you’d have to join/query league_user_association).
      • Remember to be careful using op.execute mixed with ORM commands inside of scripts (like alembic migrations). I’m not sure of the exact terminology, but there’s (session, base, flushing?) behavior that’s different between the two. A lot of my core functions use the ORM to query, which won’t pick up immediate results of things like inserts and updates from raw op executions right before.
      • You can use db.session.execute (and then db.session.commit right after) or direct with db.engine.execute which is basically the same as op.execute or psql.
      • With an ORM, you don’t insert directly into the association tables. Just update the relationship columns on the main tables and sqlalchemy will insert into the association table as necessary.
    • SBSC.
      • Added the paid leagues, unique for each season.
      • https://gitlab.com/bmahlstedt/supercontest/-/issues/173
      • This obviously requires an association table. Note also though; the role table can technically just be an FK, or even an is_admin col in the users table.
      • Piped everything through all views. The frontend now defaults to the paid league (for allpicks, lb, and graph) if you’re in it for that season, or free if not.
  • Wednesday

    • 196 of 535 congress members accepted money from SBF/FTX.
    • Private work.
    • Saw hadestown on broadway.
    • Lightshow control, pattern design, software development. Not just mapping each LED to an address and passing floats for brightness/color/etc at each time slice – that’s the from-scratch route. Instead you can input acoustic patterns and have the LEDs match the current music.
    • Amazon Smile is shutting down in a month.
    • SBSC.
      • Continued work on the SBSC data backfill. Found some issues with the port yesterday. Actually finished today.
      • Created a ticket to create the teams table and have other tables FK to it. Right now, columns with team names (in lines, scores, picks, etc) can be anything – there’s no enforcement. https://gitlab.com/bmahlstedt/supercontest/-/issues/175.
  • Tuesday

    • 314th day without snowfall. 4th largest snow drought in nyc history.
    • Tons of private work today.
    • SEC declared that Gemini Earn violated securities law. You’re lending your assets (crypto) for interest payments (yield), which is technically the offering of an unregistered security (according to the SEC).
      • “The investment of money in a common enterprise with a reasonable expectation of profits to be derived from the efforts of others” = security. Everything is a security.
    • Cold weather makes our noses run. This is because cold air is dryer. Lower temp means more moisture condenses out of the air, leaving less moisture in the air. Dryer air means our nose produces more mucus to keep it moist.
    • 3AC founders Su Zhu and Kyle Davies are starting a new venture: an exchange (called GTX) for crypto bankruptcy claims (lol).
    • Got the Fidelity 401k check, sent to MS to rollover in their prepaid fedex envelope.
    • SBSC. Finished the backfill, 2014-2017. https://gitlab.com/bmahlstedt/supercontest/-/issues/172.
      • One migration for backfills to the seasons and weeks table.
      • One migration for backfills to the lines and scores table.
      • One migration to add old users.
      • One migration for backfills to the picks table.
  • Monday

    • Did a little bit of this yesterday too, but focused mostly on house stuff (plants, aquarium, mealprep, smoothies, bacon, gym, clean, laundry, etc).
    • Adult neurogenesis is real. We create new neurons. Neuroplasticity is great. We can learn, remember, change, whatever.
    • Considering SXSW for horror this year, Mar 10-19, Austin.
    • Little deepdive in generated columns for postgres.
      • Came out in postgres 12 (2019).
      • You can have one column be completely dependent on others. Calculates when the depended columns are written (on insert) and recalculates every time the depended columns are updated.
      • You can think manifest this in two ways.
        • Stored. You can have the generated column written to disk (on every insert and update, as mentioned), just like a normal column. This is the same as a materialized view, but for cols instead of tables.
        • Virtual. You can have the generated column only be calculated when it is read (during a query). This is the same a regular view, but for cols instead of tables.
      • Right now for SBSC, I do this in python. Calculations of coverer (from other scores cols) and points (from other picks cols) are done in the app. This is very inefficient. And it’s not deterministic. They’re only written and read on app events, rather than direct write/read operations on the dependent data. Created ticket to fix: https://gitlab.com/bmahlstedt/supercontest/-/issues/174
    • SBSC.
      • Added some fake dates to the seasons and weeks tables to simulate offseason, preseason, and regseason (I had already tested yesterday’s changes against postseason).
      • Created a gdrive folder for all sbsc content (not source, not in repo – this is some old gsheets and gdocs).
      • https://gitlab.com/bmahlstedt/supercontest/-/issues/172
        • Backfilled all the missing 2019 data. Finally.
        • Basically a long manual ETL. Grabbed data from some public sources, butchered it in excel to match the format expect by my commit() functions, then created an alembic migration to load everything.
        • Had to add a ton of functions. All details on ticket.
        • Everything stored in alembic migrations.