ChatGPTplus will be $20/mo: https://openai.com/blog/chatgpt-plus
Here’s Sapolsky’s lecture series that matches much of the content in Behave: https://www.youtube.com/watch?v=NNnIGh9g6fA&list=PL848F2368C90DDC3D
Karpathy’s neural networks course is excellent, I’ve heard: https://karpathy.ai/zero-to-hero.html (will do eventually)
MS confirmed that any funds deposited into the IRA account will be automatically allocated by the manager. At 50k, the self-managers open up, of course.
SBSC. Switched supercontest-client over to poetry.
Seamless overall. Generate API key in pypi, add to poetry config, build and publish.
Yanked the old packages under the name supercontest. It’s supercontest-client now.
Random Python reminders.
Will always be duck typed (dynamic). But you can utilize type hints to make it closer to static typing as much as you’d like. Python does not check these type hints at runtime. It does not care. They are simply used by static analysis tools to flag issues before running.
pysa is meta’s static analysis tool for python. Does some linting, style, and security checks. Runs well with pyre, their type checker.
Switch statements are the declarative version of a bunch of if statements, which would be imperative. Much clearer as switch. Happy python added this in 3.10.
Remember that most comparisons are equality comparisons (for literals). For singletons like True/False/None, it’s an identity comparison.
For poetry, the caret ^ in version specification means anything up to the next major version (technically the leftmost number, which in semver in always major).
^2.0.0 = ~2 = 2.*
The __future__ module is python’s way of introducing incompatible changes (outside of semver).
Remember asyncio is another option for concurrency. Multiprocessing is … multiple processes. Separate. Understandable. Threads are great, but python’s GIL prevents them from being truly concurrent. Coroutines are the answer. Asyncio allows you to get around the GIL in a single thread. Call an async function, don’t wait for it to return.
And then greenlet is similar to threads, but they don’t let the OS scheduler handle switching. You write in the switch points into your program logic. It’s explicit in your code.
The stdlib email module is not an all-in-one mail solution, it’s mostly just for the message handling (not the sending – that’s the smtplib builtin module).
flask-mail just wraps those two. It’s literally one file: https://github.com/mattupstate/flask-mail/blob/master/flask_mail.py
The stdlib venv module obviously ships with more recent python versions. It acts like virtualenv, just call python -m venv instead. But this is rarely needed anymore; use pyenv to manage system python environments and poetry to manage virtual environments. There are higher-level tools to manage executables and site-packages by project/image/path/machine nowadays.
Looked up trade-in value for my old dell xps13, lenovo thinkpad, and ipad. Combined, it would be around $20, so not worth the time. I’ll probably just recycle them.
Removed ipad from apple account, find my *, icloud, etc.
Unicode 15 is the latest release. 149,186 characters.
Signed out of appleID on mac and back in to resolve the incessant “iphone wants to access this macbook – approve/deny?”
Asked MS to allocate the deductible 2022 6k and 2023 6.5k contributions from cash. into equities (same distribution).
My building is reopening the garage on march 1st. I asked if I can bring the ducati back the night before, feb 28th (motorgrrl charges on the 1st of the month, for the whole month).
Earnings.
AAPL: miss 3.64% eps, miss 3.7% rev.
GOOG: miss 12.21% eps, miss 0.58% rev.
AMZN: miss 82.6% eps, beat 2.35% rev.
META: miss 20.8% eps, beat 1.54% rev.
My verizon autopay uses my boa debit because it provides a 2% discount. This is given for all debit autopay, and provides the 2% return in Verizon Dollars. These are only usable for verizon things. I switched it over to CSR, which has higher rewards, and can be used universally.
To delete columns of text in vscode like vim, use ctrl-alt-mouseDrag.
Lots of work on the SBSC ticket to upgrade python, flask, and many other versions. Ended up getting sidelined writing my own image for chrome/chromedriver/python/selenium. Will add details once complete.
While the macbook air does have a dedicated magsafe charging port, it can also charge via usb-c.
Dymicron now makes diamond discs for replacement surgery: https://invest.dymicron.com/
Delta is turning on free (viasat) wifi today for most of its planes.
They’re not just bringing back the mammoth – they’re reintegrating the dodo as well!
Lots of private work.
Flew to miami.
Transferred tender disbursement to TD and prepared positions.
Added boa to ms and transferred IRA contributions. Since traditional, not roth (contribute after-tax), can deduct the full contribution. Did the maximums, 2022 individual 6k and 2023 individual 6.5k.
Macbook.
Changed default shell to bash. (chsh -s /bin/bash)
Copied my dotfiles over.
Ended up removing those. I’ll just use z shell, good chance to familiarize anyway.
Added a couple aliases.
Generated ssh keypairs for various things.
Installed homebrew.
Installed the_silver_searcher (ag).
Installed poetry.
Installed rosetta 2.
Installed docker (docker desktop for mac, apple silicon).
Installed ansible (comes with ansible-playbook).
Was able to get into the prod EC2.
Did a prod db backup successfully (remotely).
By default on new macbooks, Airplay Receiver is listening on port 5000. Disable this in system settings so that you can run your flask apps.
Successfully got sbsc up locally.
Frontier charges extra for a carry-on ($65), and it’s more than checked baggage for most other airlines.
The compose utility now comes with docker.
The strassburg sock is the one for plantar fasciitis that flexes your foot all night.
Linted the whole project. Few other little improvements as well.
Generators are faster, use them for iteration ranges if you don’t need to do anything with the result list (index, fetch item, etc). This just looks like tuple comprehension for literal syntax (list comprehension but replace brackets with parentheses).
Remember to use custom sqlalchemy expressions for boolean comparison (like pylint singleton-comparison, can’t just do “column is True” in an ORM query).
Switched to the application factory model for things like sqlalchemy/mail/scheduler/etc instantiation. Previously these objects were instantiated in the main app init. Then other modules would import them when they needed them (like models importing db, the sqlalchemy object). This creates a ton of cyclic imports. Instead, just instantiate the objects in the submodules and have the main app init.create_app import them. Then you can do some cool stuff like create multiple apps, all using the same extensions. Or different test harnesses.
So sick of fedora freezing and causing problems on my thinkpad. Bought new laptop. Went with the macbook air in comparison below. Store pickup, Apple store in Grand Central Station. Took home, setup, configured before flight tomorrow.
XPS13
MacBook Air
CPU
12th gen i5 10core
m2 8core
GPU
Iris XE
m2 8core
Mem
8GB
8GB
Storage
512GB ss
256GB ss
Display
13.4″ 1920×1200
13.6″ 2560×1664
Weight
2.6lbs
2.7lbs
Battery
51Wh
53Wh
Camera
720p
1080p
OS
Ubuntu 20.04
macOS 13.2
Price
$689
$1199
Setup.
Reminder that I have most things stored in the google suite: drive, mail, sheets, docs, maps, photos, calendar, etc.
And then others specific to their cloud: oura, 8sleep, etc.
But there are few things in icloud: shared albums, messages, passwords/keychain, contacts, wallet, whatsapp/telegram, health, backups, shortcuts, voice memos.
All settings. Configured displays, battery, lockscreen, dock, night mode, menu bar, etc.
Swap safari for chrome default. Add profiles.
Uninstall all default apps (except the MANY system ones that don’t let you). Just open launchpad and hold option, then X everything.
Instead of windows-<num> to launch an app pinned to the dock, you have to push fn-ctrl-f3 then arrows to pick then enter. That’s the native solution, but clearly bad. Downloaded a simple app “Snap” from the app store. Just command-<num>. Much better.
Added cmd-space for launchpad, left default of f4 for spotlight (both allow search of computer for apps and others).
Most of my contacts are google (not apple/icloud, or other). So you have to give permission to sync those.
Downloaded Rectangle (free) for tiling/snapping/dragging/maximizing. Perfect. Same as all the arrows of windows but instead of the window key, use cmd.
Remember some apps are built for intel chips. The binding app Rosetta allows you to runs those on an m2 computer.
The record for consecutive days without snow in NYC is 332. We’re at 325 right now, and the 10-day forecast predicts no snow.
The official threshold for measurable snow is 1/10″ sticking.
Lots of private work.
Transferred to BoA business checking for min – no fees. I use this liquidity as part of the emergency fund as well.
Switched from pip-compile to full poetry for dep resolution and env management.
Ran black on all application code.
Removed a lot of inline pylint disables and consolidated to 28 globals in pylintrc. Will go through and remove soon, handling properly.
Also snuck in an improvement: the logic to move the home route between matchups and leaderboard is now automatic, based on pre/regseason and post/offseason.
Withdraw all from Schwab. No margin, was available.
Only 8 teams have won the world cup.
Morning Brew is run by Eagles fans?
Picked up my v2 double garden and personal rise garden from The Today Show (32 W 49th, stage door). The third layer extension for the v2 will arrive soon (emailed Ryan), as well as the replacement trays/etc for my v1. Reassembled the new one, looks great.
Hey! Matt Levine posted about Elon today!
Forward contracts. Remember futures are just like options, but you have to transact at the (expiration/settlement) date. Futures are traded on exchanges. They’re a known, templated derivative. Forwards are just like futures, but are bespoke, subjective cases. Usually a 1:1 agreement with a counterparty over a specific, less common transaction.
Opco = operating company. The primary company doing the business. Usually used in comparison to the propco (property company), the counterpart responsible for the holdings.
Closed-end fund is just closed after IPO (primary). All sales occur in the secondary market after that. An open-ended fund allows new investment capital to come in at any time. It can issue new shares, new LPs, etc.
Fund ratings. Issued by many bureaus, but morningstar is probably the most common. 1-5 stars. A 5 star rating = top 10%. Based on 3/5/10yr perf, and volatility. Fund must be >3yrs old to get a rating.
Tata steel finished. Crazy ending. Abdusattorov losing in last right after winning all tournament, tying for 2nd with Magnus. ANISH with 1st.
Subscribed to fintech collective.
Lots of private work.
Massage envy said they required a doctor’s note to cancel my membership! I replied that massage therapy is not something the doctor writes a prescription for, so it’s not something the doctor writes a note to unprescribe.
Equity capital markets (explicitly): All the equity capital markets, public and private. Includes derivatives, not just shares. Primary market is when issuers issue directly. VC raising, IPOs, etc. Secondary = most exchanges.
Duck for lunar new year party yesterday. Had ~30 over.
Grinded dry rub for the duck breast. Seared.
Rendered all the skin/fat for leg confit.
Didn’t have time to simmer the carcasses for stock.
The 49ers injured their first 24 strings of quarterbacks and lost the NFC championship to the eagles because we didn’t have enough men left on the field to compete (by rule).
AWS.
Webapp options.
My kneejerk: Buy domain from registrar -> Route53 DNS -> EC2 VM (or ECS/EKS) -> run nginx and backend server. Fronted can be statically served from server, or cloudfront.
Simplest option: static content on s3, serve with cloudfront CDN.
Amplify is the closest to vercel. Built for js/react type apps. Push your code only, CD triggers from git. No management of infra. It will deploy. You can connect Amplify to multiple backends (if you need dynamic/interactivity/persistence):
API options: API gateway (rest), AppSync (managed graphql service), EC2 (custom API).
Business logic: lambda (serverless), EC2 (server).
Persistence options: DynamoDB, any of the others.
Lightsail. Remember this was pitched as the lightweight version of EC2. You can deploy a frontend and/or backend. Can run on EC2.
Elastic Beanstalk. Very similar to lightsail, but with a few extra features: blue/green deployments, more network controls, more OS controls.
EC2. You can obviously run a full frontend or backend directly on EC2. Full control.
Containerized options.
Lightsail also supports containerized deployments.
ECS and EKS can obviously run a full frontend or backend in containers.
App Runner is a simplified workflow to deploy containerized webapps. Requires no exp.
No matter which cloud webapp architecture above you go with, you can use CDK to init an app (comes with frontend and backend templates), define the infrastructure/resources, and deploy.
Deployed an app of mine with Amplify.
Overall, I like vercel better so far. Much simpler.
amplify mirrors a lot with git: push/pull, checkout diff envs instead of branches, etc.
The integration with route53 with the domain registration, hosted zone creation, and SSL creation – this was absolutely seamless with amplify.
This is awesome: https://neal.fun/wonders-of-street-view/
Lots of private work.
Clinched 1st in challenge pool ($90) and 2nd in sbsc ($285).
Filled 3 buckets RODI. Change tomorrow morning before LNY.
Ordered new tropic marin salt. 200G synbiotic and 200G proreef. Both from saltwateraquarium, who had the biggest buckets in stock. $260 all-in.
Amazon Fresh increasing the minimum-for-free-shipping from $35 to $150. Should be fine, I hit that with my usual smoothie order.
A “qualified buyer” can mean a few things. Can mean you’re pre-approved for a mortgage. In the loan space, generally means that you meet certain criteria above the risk floor. “Qualified purchaser” in the investment space means you have 5M in assets, slightly above accredited investor.
NAV loans.
Credit/debt/fixed income funds.
2 and 20 common among equity funds, VCs, and hedge funds. 2% (of AUM) for ops / management. 20% (of profit) for performance incentive / alignment. Both annual.
Duck.
Went to chinatown, bought 6 ducks. Avg ~$5/lb, and ~5lb/duck.
Pekin duck is usually less gamey than other ducks (mallard etc). Better flavor.
Ducks have a much lower chance of carrying salmonella than other poultry. Both (1) for biological/immunity reasons and (2) they’re not farmed like chickens, which incubates stuff like that.
Separated the breasts and the legs from the carcass. With the remainder, removed meat/skin/fat (for rendered fat) and everything else (bones/organs/etc) for stock.
Scored/drybrined the breasts and left uncovered in fridge overnight to deverlop the pellicle.
Prepared the rub for the legs (confit) with onions, shallots, garlic, and szechuan pepper. Applied and marinated overnight (covered for these).
Will render the fat, make the stock, make the breast dry rub, bake the duck confit, and sear the breasts tomorrow.