• Friday

    • 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.
      • https://gitlab.com/bmahlstedt/supercontest/-/issues/182
      • 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.