Start a new typescript react project
create-react-app <app_name> --scripts-version=react-scripts-ts
Basic deps
# For building css and js in the same command
yarn add npm-run-all
# Resources | |
# - https://mypy.readthedocs.io/en/latest/cheat_sheet_py3.html | |
# - https://mypy.readthedocs.io/en/latest/introduction.html | |
# | |
# Typing None is useful because mypy default to dynamic typing and a return value of Any when the return value is left off. Therefore, calling something like `1 + hello()` where hello returns `None` will result in an error: | |
# | |
# demo.py:5: error: "hello" does not return a value | |
def hello() -> None: | |
print('Hello') |
Start a new typescript react project
create-react-app <app_name> --scripts-version=react-scripts-ts
Basic deps
# For building css and js in the same command
yarn add npm-run-all
Reddit is a treasure trove for excellent product recommendations. The site promotes unbiased product recommendations and bans posts from promoting products. On the downside, these recommendations are often ephemeral and you have to be monitoring Reddit often to get in on the recommendations. I looked through 100s of GBs of Reddit comment data to find some of the best recommendations that Reddit has to offer.
What type of products is Reddit recommending? Well, of the almost 100,000 products mentioned on Reddit since 2015, 30,081 are books. Unsurprisingly, almost all subreddits on Reddit recommend books. However, there are a few that stand out as subreddits that recommend a particularly large number of books. The top 5 subreddits are:
ThingsOnReddit is a website to allow users to view amazon products found on different Reddit subreddits. It allows users to find unique recommendations that would not otherwise be discoverable. It also allows users to sign up for a newsletter with curated products that are the best of the month. Lastly, ThingsOnReddit allows users to view trends in the products being posted to Reddit to gain further insights, such as what type of products are people posting to Reddit and how often.
apps/session_middleware.js entities/cc_app.js entities/sessions.js spec/hq.events_spec.js users/user_controller.js | |
apps/session_nav.js entities/globals.js models/user.js spec/menu_list_test.js users/utils.js | |
collections/user.js entities/menu.js spec/fixtures.js spec/user_spec.js users/views.js | |
apps/list: | |
list_controller.js list_view.js | |
apps/menus: | |
menu_controller.js menu_view.js query_view.js |
select *, REGEXP_REPLACE(REGEXP_REPLACE(word, r'^[^:]*:', ''), r':[^:]*$', '') as emoticon from ( | |
SELECT type, repo.name, actor.login, org.login,JSON_EXTRACT(payload, '$.comment.id') as comment_id, JSON_EXTRACT(payload, '$.comment.url') as url, SPLIT(JSON_EXTRACT(payload, '$.comment.body'), ' ') as word, MONTH(TIMESTAMP(REGEXP_REPLACE(JSON_EXTRACT(JSON_EXTRACT(payload, '$.comment'), '$.created_at'), r'"|T.*', ''))) as m | |
FROM (TABLE_DATE_RANGE([githubarchive:day.events_], | |
TIMESTAMP('2015-03-01'), | |
TIMESTAMP('2015-03-10') | |
)) | |
WHERE (type = 'IssueCommentEvent' OR type = 'PullRequestReviewCommentEvent' OR type = 'CommitCommentEvent') AND org.login = 'dimagi' AND actor.login <> 'dimagimon' | |
) |
author | emoji | |
---|---|---|
benrudolph | 100 | |
benrudolph | astonished | |
benrudolph | balloon | |
benrudolph | bear | |
benrudolph | bird | |
benrudolph | birthday | |
benrudolph | blowfish | |
benrudolph | boat | |
benrudolph | bomb |
How to use d3-tip with d3's simple bar chart example.
month | author | count | |
---|---|---|---|
1 | benrudolph | 1 | |
1 | biyeun | 1 | |
1 | czue | 4 | |
1 | esoergel | 3 | |
1 | millerdev | 1 | |
1 | snopoke | 4 | |
2 | benrudolph | 1 | |
2 | czue | 13 | |
2 | dannyroberts | 1 |