• HN/PW.
      • Papermill is a tool that takes a Jupyter notebook (and some params) and executions it with a production context in mind (saving artifacts, etc). Netflix has been pushing these architectures hard, even outside of the data science workflows at the company, because it’s a great way to combine runtime with notes/datasharing for others to consume.
      • Some awesome gems in python 3: https://datawhatnow.com/things-you-are-probably-not-using-in-python-3-but-should
        • fstrings for autoformatting based on variable names.
        • built-in lru.
        • type hints.
        • no __init__ necessary for subpackages.
    • Game of thrones and barry are done, mostly just nba/nhl now (although that will finish soon too). Westworld s3 trailer came out (parts filmed right here in hermosa).
    • Very interesting segment! https://www.youtube.com/watch?v=aMcjxSThD54.
    • Warriors swept Portland, off to the 5th consecutive finals!
    • Bought the circus murder mystery night (from a new company), started preparing everything for saturday.
        • Back from LiB! Great trip. Uploaded and shared pictures.
        • Yesterday caught up on all the quarterfinals NBA/NHL games that I missed, game of thrones, and ufc/bellator events.
        • QR stands for Quick Response in QR codes. The most recent version is a 177×177 grid.
        • Emails, newletters, HN, PW, MD, etc:
          • Guido about creating python (as a middleground between C programs and shell scripts) and stepping down as BDFL: https://www.youtube.com/watch?v=qxMcGDnT8uc.
          • SQL is old and has many pitfalls. We should not resist the forthcoming of newer query languages.
          • Some good response headers to add to your server’s HTML pages:
            • Strict-Transport-Security: max-age=1000; includeSubDomains; preload
            • Content-Security-Policy: upgrade-insecure-requests
            • Cache-Control: max-age=30, public
            • Accept-Encoding: gzip, deflate, br
            • Accept: image/webp; imgae/apng, image/*, */*;q=0.8
            • Accept-CH: Width, Viewport-Width
            • Accept-CH-Lifetime: 100
            • Link: </font.woff2>; rel=preload; as=font; no-push
            • Feature-Policy: vibrate ‘none’; geolocation ‘non’
          • Remember, PyTorch is an ML library.
        • Apparently the purchase offer proceeds are doled out through cash holdings in Solium, rather than between SpaceX and the employee directly. You have to elect between a transfer (which requires bank info) and a check (which requires an address). If you don’t elect, it defaults to check. I was out of town with no service, but I received no notification of shipment, so I emailed them today (others said they received their transfers earlier).
        • GSW crushed Portland in game 1.
        • Promises in JS are just like callbacks (setTimeout, etc), just cleaner. They define two things: what to return when it succeeds (.then), and how to handle the error when it fails (.catch). Resolve vs reject. You can have multiple chained .then calls, executed in order if it no errors are thrown in the previous. You can also fire off multiple promises at the same time (Promise.all([]).
          • async is simply a way to return a promise. Then you call await, which blocks until the promise resolves. You can do multiple concurrently with Promise.all() in the same way.
          • California has a larger economy by itself than every country on the planet except 4: US, China, Japan, Germany.
          • Got my POA notarized. Allie will bring to SpaceX tomorrow. We also got the final allocations today. lol.
          • Read about all 3 star wars trilogies, 9 movies in total. I have only seen maybe 2 of them, and only when I was a child. Not a fan, but was just curious to read a 10min summary of the entire saga.
          • Unloaded amazon fresh and packed the BMW saddlebags full of all LiB food. Packed all regular stuff as well, after laundry.
          • Supercontest
            • Split the uwsgi ini file into proper sections and moved all configuration there instead of as clargs in docker-compose.
            • Process
              • docker network create nginx-proxy
              • docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro –name nginx-proxy –net nginx-proxy jwilder/nginx-proxy
              • Then start the app containers (usually `make build-start-prod`).
            • letsencrypt-nginx-proxy-companion has some useful utilities.
              • docker exec nginx-letsencrypt /app/force_renew
              • docker exec nginx-letsencrypt /app/cert_status
            • Created the bmahlstedt.com github repo. Added a tiny app with tiny landing page.
            • Created the infra github repo. Moved the command line process above to a docker-compose and added a readme. Now, you simply docker-compose up there (after creating the nginx-proxy network) just once, and then can create as many virtual hosts as you’d like.
            • nginx-proxy is pretty dope. It uses a dummy dhparam while a new one is generated in the background (2048 bits can take a while), then it reloads nginx automatically when done.
            • Renamed services (like app_prod) to use dashes instead of underscores (to app-prod).
            • Confirmed that app-dev still works.
            • After a docker system prune, you need to recreate the network. The volumes will stay by default.
            • http forwards to https and www forwards to non-www (just southbaysupercontest.com and bmahlstedt.com).
            • Got ssl working with letsencrypt-nginx-proxy-companion. The setup is pretty clean now.
            • Updated documentation.
            • Closed #47. Everything is done now. There are two containers (nginx-proxy and letsencrypt) that control traffic (and certify) all other virtual host containers on that machine. Right now that includes two apps, southbaysupercontest.com and bmahlstedt.com.
          • DHPARAM = Diffie Hellman parameters, used for secret key validation.
          • Buyback BS.
            • I made my election and submitted the transmittal form separately to SpaceX. This is a dumb requirement in the first place, because you’re already making a digital confirmation.
            • I played with my election after, knowing that I wasn’t going to change it. I just wanted to observe. I intentionally did not submit the transmittal forms for these.
            • Because the transmitted number and my solium number did not match, Solium generated incorrect final documents. SpaceX can fix this, but they need my power of attorney since it’s technically changing a number after the close date. Ridiculous and inconvenient (requires notary).
            • Made an appointment for BOA tomorrow.
          • Dad is going in for surgery tomorrow, called for good luck.
          • Placed Amazon Fresh order for Lightning in a Bottle – $140. Soylent, protein bars, and almost every non-refrigerated fruit & vegetable you can imagine!
          • Tutorials
            • Express
              • Process
                • npm init (creates package.json)
                • npm install express (adds it to node_modules/ and the deps in package.json)
                • app.js with require, app instantiation, route addition, listen on port.
                • node app.js
              • This is identical to what I’m used to. Remember, node is the javascript runtime outside the browser (python). Express is the web framework (flask).
              • Autoreload behavior can be enabled by `sudo npm install nodemon -g` then `nodemon app.js` instead of `node app.js`.
              • Pug (and old-school jade) is the template engine for node, just like jinja is for python. You can render these templates and insert variables and other functionality.
            • JS, even with its exponential growth, is still not as full-featured of an environment for enterprise app development as something like java/python/c#.
              • Typescript goes a little further than JS because it has static typing.
            • OvernightJS is a utility lib for apps build with typescript and express. Gives some nice classes and controllers and decorators.
          • Updated resume. Cleaned the skill organization at the bottom. Did a little on linked/github as well.
          • JS is, of course, dynamically typed like Python. Types are inferred at runtime. Typescript is statically typed, so types are known before runtime. You can lint this with tslint.
            • Python 3 has type hinting (called such because it’s optional). You can specify the input and output types a function expects, and then static analysis can catch any errors before runtime. It’s also nice for documentation.
          • California is about the same latitude as the VERY bottom of Europe, almost between it and Africa. Northern California is about the same as Spain/Portugal.
          • Deer shed their antlers every spring and they grow back during summer. I had no idea.
          • Started work on the reverse proxy for supercontest and bmahlstedt.com. Will post all details tomorrow.
          • Played around with maintenance banners for a downed website. You basically just have to return 503 so search engines know it’s temporary. Then, for users, you can add a custom html template with a friendly, descriptive message.
          • Helped jcriss with the grom mods. Bar end mirrors, bunny ear blockoffs with turn signals integrated, fender eliminator with brake and turn signals, sprocket, brake and clutch shorty levers.
            • Sliced open my finger pretty bad with an exacto knife while slicing a bundle to rewire.
          • Smoked ribs again for game of thrones. This time did NOT use hot sauce as the only marinade! Added a little curry to the rub.
          • Got the replacement amex and activated it. Got new insurance cards and put them on all bikes.
          • Received my medical identification card and the choice form. You must elect one of the two plans: LA Care and Health Net. They’re both HMOs. I choice Health Net because Torrance Memorial Medical Center is under them, my closest hospital (although Health Net’s Medi-Cal plan will cover emergency services anywhere in the United States!) I have no intended doctor visits or anything else to sway the decision. Chose Salahuddin Aschrafnia as primary care simply because it’s close (Redondo) and decently rated.
          • Unboxed the new tent and sleeping pad for LiB, practiced assembling everything (even hitching the guy lines).