-
- FIBA world cup has finally entered the bracket stage, with only 8 teams left. We play France.
- Filtered my oat milk twice instead of once for the first time day. Made a huge difference.
- Ekeler did a fantastic job yesterday while Gordon continues to cry. Love it.
- Passer rating is basically (touchdowns + yards + completions – interceptions), weighted and normalized by attempts.
- Ranges from 0 to 158.3 (perfect).
- To get perfect, it’s basically 12 yd/throw, 80% completion, a touchdown every 10 throws, 0 interceptions.
- Aaran rodgers has the best career passer rating (103.1) and best season (122.5).
- The Equifax data breach settlement continues to disappoint. They now require an additional step from everyone – you must provide proof of an active credit monitoring service to get the <$125 cash, otherwise you only get the free credit monitoring service in the settlement.
- Lost both fantasy matchups this week.
- Remember, a semicolon in js is used to terminate a single statement. Curly braces are blocks that contain statements. If you have an if (condition) {statements} you don’t need to terminate with semicolon. If you define a function() {} you don’t need to terminate with a semicolon. If you assign and define a function, like const foo = function() {}; then you need to terminate with a semicolon.
- Supercontest.
- Changed it so that calc_lb only does it for the current week, not all in the season. Much faster.
- All current winners and points are now calculated serverside only. It checks the current values and does the math once, then passes matchup.winner and pick.points back to templates as needed. This simplified much of the javascript, since I don’t do the duplicated calculation anymore.
- Went back through a lot of the js and terminated statements properly, shifted to 4-sp indentation, etc.
- The /picks tab now respects games that haven’t started, coloring them blue.
- All tabs that require current scores (picks, matchups, lb, graph) are much cleaner on the backend, calculating only what’s necessary and passing as little as possible through the templates. This required that the lb and graph endpoints got smarter, bc they didn’t have the value preprocessor and defaults for week/season.
- The lb is only colorized once a week is completed now.
- Sorted the matchups table by datetime and the picks table alphabetically.
- Deleted the 2018 week 18 fake data.
- Changed the doc onload behavior of coloring picks to a function, called still once onload and then also every time after pick submission. This separation allows submitted picks to be dark blue and unsubmitted to be light blue, which I implemented.
- Tried to make the column headers vertical in the picks table (for team names), but this is unnecessarily difficult in css. Leaving team name abbrvs for now (changed pats to NE).
- Closed https://github.com/brianmahlstedt/supercontest/issues/71.
- My laptop can’t find the tv via chromecast half the time. Turning wifi on/off (from my laptop) works, but this is still annoying that chromecast can’t flush. I’ve confirmed they’re always on the same network.
- Because of the docker cache, deployments are significantly shorter for smaller changes. To not need to rebuild the image is very timesaving.
- Remember, Python and Javascript have different representations for key/value pairs (dict, hash table). Jinja can handle your python dict just fine, but in order to pass it through a template to js, it needs an interim format that’s useful. The most common is json. Dump it in your python app, then have js able to read it.
- data=json.dumps(my_dict) in the route, then myData = {{ data|safe }} in the template.
-
- Great day/night with Colin/AK yesterday. Smoked beef ribs and played games at the new apartment then went out on Artesia for shuffleboard/pool.
- In true Cheick Kongo fashion, Cheick Kongo forfeited his title fight in the first round due to an eye poke lol. Ruling was NC, Bader keeps the Bellator HW belt. I have never seen a fighter give up voluntarily like this; they’re usually screaming at the doctor and the ref to let them continue. Not doing well for French combat stereotypes.
- First NFL sunday of the season. The best.
- Went 4-1.
- 49ers wons.
- Supercontest behaved perfectly. Picks autopublished at midnight, scores updated in realtime, no issues.
- IT Chapter 2!
-
- Antonio Brown was released by the Raiders after all the back and forth princess drama. Trying to fight the GM, calling him a cracker, posting on social media about BS fines, apologizing, releasing a youtube video with private phone calls, etc.
- Watched IT chapter 1 to prepare for the new one.
- UFC 242, Khabib vs Poirier.
- Routing/batching/pathplanning software opportunity.
- Talk with Nel’s Dad:
- My own research:
- Two APIs for live traffic data:
- TomTom has a routing API as well, which includes realtime traffic, and does many-many, but it is limited to 700: https://developer.tomtom.com/routing-api/routing-api-documentation/batch-routing.
- Most the APIs are the standard pay-as-you-grow, up to about $1 per 1000 transactions.
- It looks like there are actually a ton of products out there for routing and pathplanning, even with batch: https://www.capterra.com/route-planning-software/ and https://www.badgermapping.com/blog/routing-software-small-business-overview-available-choices/.
- OptimoRoute, Locus Dispatcher, WorkWave Route Manager, Wise Systems, ClearDestination, Phalanx, OnFleet, YaCu, Cro, Titanwinds TMS, RouteSavvy, Routific, MobileIQ, C2Logix, MapPoint, Badger Maps…
- Uber obviously has tech for this: https://eng.uber.com/engineering-an-efficient-route/.
- This is a 3-part series about how Lyft achieves the same thing: https://eng.lyft.com/matchmaking-in-lyft-line-9c2635fe62c4.
- And Amazon for its driver deliveries: https://www.technologyreview.com/s/608640/inside-the-increasingly-complex-algorithms-that-get-packages-to-your-door/.
- Overall, I’m wary that a smaller (newer?) product in this space will compete with the big players – or there’s a difference in the product and its application/needs that I’m not seeing yet.
- Gonna talk with Stacy, their director, and hopefully an engineer on the team.
- Supercontest.
- Realized that you could technically back out everyone’s picks before lockdown with a few queries on the graphql endpoing (via web or python). This is fine for now, I doubt anyone will go through the trouble (the picks table returns id, not name, and you can’t filter by season or week directly).
-
- Researched a pattern for automatic injection of season and week into all db calls. Flask’s g object already has season and week from my default value params, but I was hoping there would be a clean pattern where I didn’t have to pass them explicitly into every db call. There are some precompile event ways in sqlalchmey, and there’s a “BakedQuery” but none do exactly what I wanted. There’s no harm in being explicit in every query for now. Once the user table adopts season as well, I might be able to just have a wrapper around db.session.query which inserts season and week everywhere, but it’s not important for now. I was surprised a normative solution for this wasn’t more common/apparent.
- Sell orders completed in Robinhood. Transferred to BoA.
- Chiro. Feel much better.
- I don’t agree with this article: https://abe-winter.github.io/2019/09/03/orms-backwards.html. ORMs are of good convenience to the majority of users, like any high-level abstraction. Most database interactions of not of the complexity/difference that would require raw SQL for integrity.
- Blog.
- In the spirit of retention, I thought it would be a good idea to start a morning habit of rereading my previous blog posts. If I go back a week, this will take about 5 minutes. Every item will be ingrained 7 times, which should be enough to remember most details.
- Changed the main page to only show 7 days, so I just read the whole site every day.
- Redesigned. Simply black now. Better font sizes. Cleaner organization. Removed some gadgets.
- The pgadmin getting started docs are some of the worst I’ve ever seen. Very verbose, and none of the content I want. How do you install? Give me one sentence with options.
- The web interface allows you some conveniences. You can run the pgadmin server in a container and localhost:5050 gets a web application. You can create users, tables, modify data, etc.
- Any package that requires you to wget a wheel and install it manually is…not going to get any attention. Upload your modules to pypi like a normal human being pls.
- I’ve been satisfied with psql so far; I’m not going to use pgadmin because of these unnecessary deterrents. PSQL forces me to practice my sql anyway.
- Supercontest.
- Added a repeat-x niners svg to the jumbotron.
- Parsed and put the rules on a new site tab. Used webcomponents and zero-md to convert the md in source to html.
- Closed https://github.com/brianmahlstedt/supercontest/issues/66.
- Started working on the Season table, ticket 68.
- Verified that the remote backup to local, and then restore local from local, correctly syncs the production db to my dev machine.
- Where sqlalchemy would usually have you declare a base, manage the session, etc – flask_sqlalchemy is what I use and it abstracts a lot of that away, simply giving you a db object to do the most common tasks with.
- Met with Art about pharma:
- Recap from my old notes:
- utm params can identify the majority of traffic we generate.
- Universal application to be approved as pharmacy. Standardizing this API would be valuable for everyone, marketplace or not.
- Kayak model: redirect them, don’t buy/sell directly. Pros: Simpler. Easier.
- Amazon/Orbitz model: allow buy/sell through our website. Pros: You can generate aggregate purchase orders. Paperwork is a big aspect. You can also hold the money and do a billing cycle.
- Could offer a small client to serve smaller vendor’s prices, putting them online.
- Exit strategy is not to monopolize, it’s to sell to Amazon (like PillPack for 753m).
- Now actions:
- Build the mvp site.
- Get domain name and host.
- Populate with fake data from multiple vendors. You might be able to get some public data for generics. Some sites even list their rx, like https://auromedics.com/products/ampicillin-and-sulbactam/.
- Write template API that we’ll encourage vendors to use. Write client from excel sheet.
- Add basic user login which protects the price comp tool endpoint.
- Add basic landing page which describes the benefits for (a) pharmacies and (b) vendors.
- We are going with the orbitz model, the buy-through-us model. This gives a few benefits:
- One stop shop. One invoice.
- Can include generics, prescriptions, and med supplies in the same order.
- We can basically give credit, where pharmacies can go on a monthly billing cycle, and we pay in the meantime.
- Go speak with vendors. Get them onboard and get their data.
- Here is where you can search for some vendors: https://search.dca.ca.gov/
- Med supply vendors are huge.
- Collect what percentage? Do research, seek financial expertise here.
- Standardized universal application.
- Vendors have to be cool with us giving their data out. This should be fine; it’s free marketing.
- Go speak with pharmacies once you have a good selection of vendors and products. Get them to start using it.
- Exit sell to Amazon like PillPack for 753m.
- Met with Nel’s dad about the pathplanning app. Notes coming tomorrow after I do more research.
-
- Elbow.
- Bloodwork.
- Walk-in, 8am when they opened. Took 45 minutes in the waiting room and 5 minutes of action.
- Made a quest account and downloaded the app, can now check results on my phone when they’re ready.
- X-ray.
- Walk-in, 915am a little after they opened. Took 90 minutes in the waiting room and 5 minutes of action.
- Picked up both prescriptions from yesterday.
- Applied the topical painkiller before pull day at the gym. Felt 1000x better. It’s incredible how much of a difference it makes. It’s incredible how muted my exercise has been for almost 2 years now. Cheers, looking forward to the permanent solution.
- Pinged and finally settled all Hawaii expenses.
- Refilled all powders and pills. Threw a lot out; all that’s left is turmeric and glucosamine. Once those are gone, I won’t reorder. I eat turmeric root directly and I didn’t find much benefit from glucosamine.
- Lamborghini makes an SUV called the Urus. Its MSRP is 200k. Crazy. But, given that 50% of vehicles sales are SUVs nowadays, I get it.
- Homemade protein bars.
- Required ingredients. Just 3. My homemade nut butter, oats, and protein powder. Mix in bowl with rubber spoon then chill in fridge/freezer and cut, or just leave in bowl.
- Optional: Honey, maple, cinnamon, cacao, coconut oil, the usual suspects.
- Now I don’t have to buy clif bars for post-gym anymore! That’s the very last processed item in my whole diet, now everything is homemade!
- Django crash course (traversy media: https://www.youtube.com/watch?v=e1IyzVyrLSU).
- python manage.py [runserver|migrate|etc] of flask-scripts comes from django.
- Default port 8000.
- Can use jinja, but defaults to django’s own template engine (which is really similar anyway).9
- Comes with a lot by default. An admin interface. Gives a skeleton structure for views, models, settings, and more. Creates all the files for you, just leaving you to edit them.
- You can do a lot with django, but I still prefer flask for the most part.
- pgadmin (latest version: 4) is a much better tool for messing with your db than psql. Use it next time.
- Checked mail for the first time in >1mo. Got the replacement amazon card and activated. Also deposited the $14 treasury disbursement (I think it was a settlement from that credit leak?) using mobile checking which was nice.
- The pecans at costco are definitely the cheapest, at ~$8/lb. Bought organic pecans for ~$10/lb (from a company called I’m A Nut) on Amazon, which is worth the convenience of online + organic. This is on regular Amazon, not Fresh.
- Homemade tahini. Just like nut butter, but with seeds. Toast them, then process them. Add a little oil or salt if you want. So good.
- Bought new tupperware. Tired of lidless, wrong-sized options.
- Homemade kava. About 3 tablespoons of root and about half a liter (2 cups) of hot water makes a decent strength individual serving. Mix a little coconut oil in (the fat helps with extraction, just like others), then steep for 10 minutes. Then knead the tea bag.
- Supercontest.
- TNF verifications, first of the season. App behaved very well. Closed https://github.com/brianmahlstedt/supercontest/issues/64.
- There was only one issue. If thursday was picked, it would reject all 5 subsequent picks if you wanted to change one of the other four (which is valid). Fixed it to verify against the current picks.
- Closed the “before 2019 season” milestone.
- Chrome on mobile allows you to create desktop shortcuts from your current page, but that doesn’t work when you want the url pre-redirect. The trick to get around it? Disable wifi and mobile data, then the browser can’t follow the redirect 🙂 Then create the shortcut from the origin site.
-
- All of my limit sells executed. Should transfer money in a couple days.
- After the all the pushback, zeke signed the biggest RB deal in history. 6yr, 90m. The salary cap in basketball is weird, but the absolute max you can make in a year is about 40m, which is 2-3x higher than football.
- Chiropractor.
- Was awesome. Used a percussion machine instead of manually doing the back cracks. Still did the neck rotation cracks by hand.
- Stretching/cracking at home is fine, as long as you don’t go too far or go too jerky.
- I think mine is more of a muscle strain.
- Gonna try valerian root and kava for some natural muscle relaxant. Also gonna ice more.
- Elbow.
- Saw my primary care for a PT + cortisone referral.
- Ended up seeding 4 more appointments:
- X-ray. Called and made one.
- Blood work. Called and made one.
- Then you go back and see primary care for the followup with results.
- Then you get the referral and go to the ortho place for the steroid shot.
- In the meantime, she gave me prescriptions for higher strength pain + anti-inflammatory pills and creams.
- Dropped them off. Came back an hour later to pick up, as instructed. It had been sitting on the counter the whole time; it hadn’t started being processed.
- The pharmacist called the doctor a few minutes later to verify the amount (dosage) of anti-inflammatory cream, since it hadn’t been written on the rx. The doctor’s office was closed, so the verification would have to come the next day and the prescription would be filled tomorrow.
- This is ridiculous. They’re going to give me the same tube, no matter what. They just needed something to write for dosage on the tube. I told her to write the smallest dosage possible, achieving the exact conservative goal that such process requirements are meant to enforce. She couldn’t.
- This is stupid, but not unexpected from a superfluous workflow that charges 1 hour for something that should take 2 minutes in the first place. Medicine and pharma need more engineers.
- Ordered new running socks (12 pairs) and minimalist running shoes, total $50.
- Cool instance where amex correctly declined a stolen card close to home based on good ML with user spending habits: https://www.reddit.com/r/personalfinance/comments/czt0x2/my_wifes_amex_was_stolen_thieves_attempted_to_use/.
- Supercontest.
- Client.
- Westgate finally posted lines for week 1. Updated, tested, and did final season-readiness verifications on https://github.com/brianmahlstedt/supercontest/issues/55.
- Submitted my picks.
- Created a new ticket for tomorrow’s live-game tnf verifications (hopefully none): https://github.com/brianmahlstedt/supercontest/issues/64.
- Deployed, talked with petty about email, done.
- LB was being calculated for all games, even ones that hadn’t started yet. Shielded the winner and point calculation with status!=’P’ so that it only calculates started games. It does show the current point totals and leaderboard placement for active games, as if all were ended immediately.
- Since the production app is not started with the uwsgi autoreloader, to ingest new changes you have to run `docker-compose restart supercontest-app-prod`.
- To wipe cells in the production db, do something like `update public.matchup set winner = null where id = XXXX;`.
-
- PMI dropped below 50 for the first time since 2016: https://www.instituteforsupplymanagement.org/ISMReport/MfgROB.cfm.
- A thought experiment that usually helps people with differing opinions see some common perspective: If the world were the size of your block, would you make the same decision?
- Would you still take advantage of that loophole you found in a business, or would you tell the owner because he’s your neighbor?
- Would you still invest in that tobacco cart when he’s selling to your kids and their friends afterschool?
- All depth charts for all teams and all offensive positions in one page: https://fftoday.com/nfl/depth.php?o=one_page&Side=Off&order_by=.
- Beet stalks/leaves, radish leaves, and cucumbers cannot stay in the dank fridge drawers. They must be kept dry on the racks, or juiced immediately when I cut after delivery.
- Liquidated everything in my robinhood account except MSFT, YUM (KFC, Pizza Hut, Taco Bell), and BYND.
- This includes AMAT, MKSI, LRCX, MSB, TSM.
- Healthcare.
- Created an account on healthnet to find providers. I can now access all my ID numbers, benefits, etc.
- Chiro is covered under ancillary services, which uses an external search provider (ashlink, you can find the link on your profile page). Scheduled an appt with the 4th provider I called.
- Tried to get a PT or sports medicine appointment for the elbow cortisone. The ones I called needed a group referral from my primary care provider. Scheduled an appt with her to get that.
- My copay is $0 for everything, which is great, but overall the experience of finding a provider has been pretty bad. Getting the account set up with the right information to filter options, calling and finding that they actually don’t take healthnet, etc.
- I also never received an ID card for healthnet (I did for medi-cal), so I ordered one.
- Got an unsolicited text from a 2020 presidential campaign today. One of the most instant ways to get me not to vote for you.