-
- This channel doodlechaos is so cool: https://www.youtube.com/watch?v=vcBn04IyELc&feature=youtu.be. He syncs classic songs with that line rider game.
- Finance.
- Great article on algorithm trading: https://medium.com/s/story/predicting-the-stock-market-is-easier-than-you-might-think-4f1e0bc05cfe.
- As a nonprofessional trader, your best bet is to follow exactly what the smart money (professionals) are doing. Jump on their trains. You can’t outsmart them, and they have a much larger influence on the market.
- Remember, the word for technology in the investment banking + hedge fund profession is FinTech.
- GDP is a fantastic predictor for success.
- ISM = institute for supply management. They publish a monthly index, based on hard data, about how the economy is trending. 50 is neutral, 0 bad, 100 good.
- If it’s hovering above 50, that’s good and you’ll see bull growth in most markets.
- If it’s increasing, no matter where it currently is, that’s good and you’ll see bull growth in most markets.
- If it’s hovering below 50, that’s bad and you’ll see bear decline in most markets.
- If it’s decreasing, no matter where it currently is, that’s bad and you’ll see bear decline in most markets.
- Therefore: Buy when ISM is below 50 but trending upward after a valley. Sell when ISM is above 50 but trending downward after a peak.
- Example report: https://www.instituteforsupplymanagement.org/ISMReport/MfgROB.cfm. This is so useful. Given the current state of slight growth but slowing rate, the advice would be to sell soon when it plateaus.
- PMI = purchasing manager’s index. JPMorgan publishes this. It’s including in the ISM report. Same general idea.
- There are tons of other css libraries out there for frontend besides bootstrap: bulma, spectre, tailwind, ant, foundation. They’re similar: bunch of classes to help lay out and style sites. Most use flexbox for gridding like bootstrap, as well as offering many similar components and utilities. Some are pure cs, some have features that require js and offer a corresponding bundle.
- Added logos to the supercontest readme: https://github.com/brianmahlstedt/supercontest/blob/master/README.md. Took a while (annoyingly) to get the md/html rendering to jive, and I did it on master like an idiot, but it looks much better now. If ever I want to do this on another landing page, it will just be a copy-paste.
- Made walnut butter. Still good, but my least favorite of the nut butters by far.
- Alembic is written by the same guy who wrote SQLAlchemy.
-
- Solid pier night for wes’ farewell yesterday. Saw Dom Mazzetti from broscience at tower 12, said wassup.
- Reread a lot of the bootstrap documentation for tables and forms.
- Supercontest.
- Updated the week_matchups and week_picks templates to use bootstrap tables properly.
- Pale green, light coral, and khaki were the primary colors – now it’s table-success, table-danger, and table-warning.
- Added routes and nav buttons for /graphql and /graph, the latter being split from the lb into its own view.
- Added season to the pick and matchup tables. Created two migrations: one for the new col without the NOT NULL constraint, then another to add it. Since the db exists already, you do the first, backfill all the values as desired, then do the second.
- Psql cmmand to write all the values: update public.pick set season=2018; commit;
- Manually edited the alembic migration to do this all in a single version file: add col, set value, add null constraint.
- Flask can’t do nested blueprints, so I basically converted week_blueprint to season_week. The matchups and picks routes use both. The leaderboard and graph routes only use season. Added similar url_defaults and value preprocessors for g, where many of the subsequent db queries are dependent on season now.
- Season addition was a lot of work. It was a nontrivial uprooting of most views/templates/models. Every db interaction basically had to be updated to specify season now.
- Reorganized the template hierarchy so that everything wasn’t just in layout.html anymore. It’s a lot cleaner now, nesting all the nav rows and everything. Each template has a corresponding js file (for the most part).
- Active-navlink logic is universal now. All have the id nav_<route>, then it just inspects window.location.pathname.split(‘/’).includes(id) to add the active class. All navs do this except the week navs, which work slightly differently. They don’t just display all available weeks, they display all 17 from the beginning, and disables the ones that aren’t available yet. This is because the nested grid, 17>12. It’s easier to just lay out the structure and fill it in as it comes, rather than make the html grid nesting dynamic. It distinguishing these ids to loop over by using weeknav_ instead of nav_.
- Added a function is_today() which does the str-int mapping for days of the week. This is already being used for restricting picks wed-sat. I added it to the fetching of scores on the /matchups route as well, so that it only checks the nfl scores if it’s a gameday (thurs, sun, mon).
- Ran into some problems because datetime.now() type objects are off in the docker container locally, as well as on the digital ocean droplet. Looks like they’re just utc:
- bmahlstedt@bmahlstedt-xps13:~/code/supercontest$ docker-compose exec -T supercontest-app-dev date
- Sun Sep 1 05:18:22 UTC 2019
- bmahlstedt@bmahlstedt-xps13:~/code/supercontest$ docker-compose exec -T supercontest-database date
- Sun Sep 1 05:18:33 UTC 2019
- bmahlstedt@bmahlstedt-xps13:~/code/supercontest$ date
- Sat Aug 31 22:18:39 PDT 2019
- Fixed by adding the following to the dockerfile:
- RUN echo America/Los_Angeles >/etc/timezone && ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime && dpkg-reconfigure -f noninteractive tzdata
- Flask appends any unused values as query params, so for the lb/graph I had to remove the week info in url_defaults and value_preprocessor. Only need season.
- Switch from nav pills to tabs to better imply hierarchy.
- Closed the season ticket: https://github.com/brianmahlstedt/supercontest/issues/54.
- Changed everyone’s name (on the prod db) to properly split first and last.
- Deployed to production.
- Emailed everybody with the new site and instructions. Done! Last items will be wednesday’s smoketests when the lines are released.
- The new joker movie is apparently phenomenal. https://www.youtube.com/watch?v=zAGVQLHvwOY.
- Impunity is the same root as punish, immunity from punishment.
- The flask-scripts/python/alembic migrations all operate on a local database, so you have two options: run the commands in the db container or copy the db over and run the commands on the host. In order to do the former, you’d have to bloat the db with system apps like python, so I’m going to do the latter.
- ctrl-t as a vim shortcut for tabs conflicts with ctags’ shortcut ctrl-t to jump back a definition. I find the latter more useful.
- zip(*iterableWithNestedIterables) is how you unpack in python! Never knew that was the inverse of itself.