-
- Private work.
- Added US-Dvorak keyboard to my desktop. Faster. Will learn a bit and try.
- Honey roasted 10lbs peanuts (325 not 350), made PB.
- Inf is type float in python.
- Supercontest.
- Some bugfixes: https://gitlab.com/bmahlstedt/supercontest/-/issues/209
- The logic for email is from the exact user notification prefs in the db. Email when picks open, email when picks closing, email all picks. The first one is the primary (although pretty much everyone has all 3 set the same, one way or another).
- Confirmed the late-pick-email-reminder went out at 8pm ET via the autoscheduler.
- 504 gateway timeouts on the prod url after deploy. I accidentally ran
make start-dev
on the prod ec2, which (I believe) killed (or orphaned) nginx and caused the ELB target to go unhealthy. The checks are every 30 seconds, and need 5 in a row to be healthy. Don’t start the dev app on the prod server! My proper CICD pipeline will fix this later, as planned.
- Remember the network path: client -> route53 -> elb -> ec2 -> nginx -> gunicorn -> flask.
- Apt upgrade/autoremove on ec2. System restart.
- Restarting wiped whatever the lowlevel problem was. Fixed.
-
- Private work.
- Magnus Hikaru SCC final!
- Cisco buys splunk, 28B.
- Hash sharding is when you hash the row and place it in that location, evenly distributing. Key/range sharding is when you control which buckets the data is sharded into.
- Wheel of Time isn’t really doing anything for me. Kim Kardashian does not look human in AHS. Billions stays excellent.
- Tips for NYT mini:
- If you get the first across, immediately switch to down. You’ll have the first letters of the words.
- Else, go to the first down and repeat (switching to across if you get it).
- Desktop is faster than mobile.
- Supercontest. The scores (including statuses) did NOT autoupdate last night during TNF. Week ID 159, game IDs 2692-2707, contestant IDs 4735-4766. GJM pats lions bengals bears titans, me colts niners titans saints chargers, raj vikings raiders, derek bills titans steelers patriots seahawks. So ONLY my niners pick was impacted. Good. Will debug tomorrow.
-
- Private work.
- Rocket Lab: https://spacenews.com/electron-fails-during-capella-space-launch/
- Chrome will re-request a non-200 page every minute if it’s the active tab (at least that’s what I’m seeing locally).
- Supercontest.
- Finished all the pre-2023-season prep (and backfill since late).
- https://gitlab.com/bmahlstedt/supercontest/-/issues/202
- Just a quick reminder of db/model hierarchy: teams, coverage options, location options, prediction options, seasons/weeks, leagues, etc. These are all the (relatively) static tables. Then 2 complex tables. There’s the
games
table, with datetime, line, and status (no teams/scores/results). And there’s the contestants
table, two rows pointing to a single game, each identifying the team/prediction/location/score. opponent_score
is denormalized here, so that we can autocalculate coverage/margin locally – the only 2 generated cols in the app. The picks table just points at a user and a contestant.
- Some bugs in the picks flow.
- Scores, added User-Agent to
requests
for scores rather than full webdriver. Some APIs this year started 403ing without this header.
- Gunicorn perceiving upstream errors (requests within a worker, from the app to elsewhere) as downstream (client, requests to the app) – https://github.com/benoitc/gunicorn/issues/1507
- Be careful using python’s
next
iterator inside of webapp routes served by gunicorn. The StopIteration
exception raised when there’s no result is caught by gunicorn and perceived to be a client disconnect, so the route returns nothing, swallowing all useful info.
- Niners giants, trivia, ues, murphy’s law, old citadel friends.
-
- Private work.
- Garden maintenance. Harvested basil and made avocado garlic sesame pesto.
- Ortho.
- Got the trays. 26 total, but should be very light. Supposed to be 14 days per, but I need so little movement, so we can do 10.
- Created appt in 6 weeks for trays 4+ and polish.
- My Invisalign app tracks tray #, days left, includes a timer for tray-off time, more.
- 22hrs/day.
- Chewies twice per day to align (don’t bite hard).
- Only water. Everything else, remove. Any food, coffee, tea, gum, anything but water.
- Take out, wash, put in container. Then floss/brush before putting back in. This makes eating/drinking much more intentional.
- This was very distracting today. So new/foreign in the mouth, hard to focus on anything else.
- Levine continues to ride Elon.
- Remember gworkspace is increasing its prices starting feb 2024. But only for the flexible, not annual plans. Business starter is still $6/user/mo. Switched mine from flexible to annual.
- Magnus and Hikaru advance. SCC final on friday.
- Terraform -> fork -> Open Terraform -> OpenTF -> OpenTofu.
- Supercontest.
- https://gitlab.com/bmahlstedt/supercontest/-/issues/172
- Again, I prefer to use the full models and sqlalchemy (
db
in sbsc) in migration scripts, as opposed to alembic’s op
.
- Example (instead of
op.execute
): season_id = db.session.scalar(text("SELECT last_value FROM seasons_id_seq"))
- Wrote a bunch of data migrations.
- Backfilled weeks 1 and 2 (lines, picks, scores).
-
- CART.
- Listing at 30 (top of range, lots of demand), making the target IPO valuation 10B. Its peak valuation was 40B during pandemic. Maplebear Inc is the parent.
- ~3.5hrs after market opened, secondaries began. It was at $42 (+40%).
- At market close, down to 33.
- Buy IPO, sell open.
- Notice and forge didn’t have useful information, as a datapoint.
- TD.
- Account value >250k to participate in an IPO.
- IPOs are nonmarginable (first 30 days).
- Trade -> Equity IPOs.
- You’ll have to submit eligibility disclosures and conditional offers to buy, each time.
- And remember, you’re buying preallocated (to that brokerage) shares in the primary market, it’s not a direct public listing in the secondary market (eg the regular buy/sell interface lists CART as invalid).
- IPO orders must be limit, not market.
- The secondary listing usually begins a few hours after IPO / market open? And only shares, not options (those start anywhere from 3-60 days after). The ticker is searchable on quote lookup, but it’s not marked as valid. Once secondaries start, then you can trade normally.
- Stripe.
- 28.42/share. 5% fee on equityzen (so basically 29.84/share).
- 10k = 352 shares.
- Implied val 67.3B. History: seed 2011, unicorn 2014, 36B in 2020, 94B in 2021.
- Should close in <2mo.
- You have to indicate level of commitment ($), provide some basic info (already associated with your profile), sign term sheet, suitability questionnaire, investment distributions / limits / risks, subscription agreement, W9.
- Then you connect your bank account (via stripe, ironically) – you don’t pay now, they’ll notify prior to closure so you can fund this connection.
- Underneath the hood, they put the investment in an equityzen fund whose sole strat is stripe.
- Overall the process wasn’t too bad. But could be made much simpler for the layperson.
- Private work.
- UES standard bloodwork. Insurance doesn’t cover results review over video call? Must be in person.
- Qualified purchaser >5M.
- Mealprep. Oat milk, liver, smoothies, full dinners. Smoothies with 2 novelties:
- Black pepper for turmeric.
- Beeswax with the honey.
- You can now directly open google password manager in chrome’s menu (rather than settings -> autofill -> GPM, 3 clicks).
-
- Back from berkshires.
- Private work.
- Play-in for the next CCT event, AI cup.
- CART listing tomorrow (NASDAQ). Moved some positions around ahead of time.
- Moved some REIT positions, EQIX, VNQ.
-
- Although I always call it modulus, I like the term integer division better; self-describes the two resultant integers as quotient and remainder.
math.isclose()
in python defaults to a tolerance of diff <= 1e-09
.
- Cornfield mazes, petting zoos, farms.
- TSLA class action: https://www.tesladetroitderivativeaction.com/
- Spelling bee buddy is great: https://www.nytimes.com/interactive/2023/upshot/spelling-bee-buddy.html
- The usual typing, ds&a, prep.
- Choosing k items from n options (and python examples)(repetitions = can choose same option multiple times)
- No order = combinations.
- No repetition = n! / (k! * (n – k)!) = math.comb(n, k) = binomial coefficient
- Repetition = (n+k-1)! / (k! * (n-1)!)
- Order = permutations.
- No repetition = n! / (n – k)! = math.perm(n, k)
- Repetition = n^k