Thanks to David Winterbottom (@codeinthehole). See https://twitter.com/codeinthehole/status/1346774847221870593
- Open Chrome > Settings
- Search "manage search engines" and click into it
| """ | |
| Helper functions for creating frequent item sets using the Apriori algorithm. | |
| """ | |
| def createC1(dataset): | |
| "Create a list of candidate item sets of size one." | |
| c1 = [] | |
| for transaction in dataset: | |
| for item in transaction: | |
| if not [item] in c1: |
| #!/bin/sh | |
| home_dir="./fall22-hw2-antonrasmussen/" | |
| search_term_array=("virginia" "beach" "coronavirus" "dall-e" "openai") | |
| cd $home_dir | |
| for search_term in "${search_term_array[@]}" | |
| do | |
| /opt/homebrew/bin/python3 $home_dir/collect-tweets.py $search_term | |
| /opt/homebrew/bin/python3 $home_dir/process-tweets.py < tweets.jsonl > tweets-info.txt | |
| link_pref="https:/" |
| from bs4 import BeautifulSoup | |
| from urllib.request import urlopen | |
| import time | |
| html_doc = "Dispatches — WTF with Marc Maron Podcast.html" | |
| date_list = [] | |
| url_list = [] |
Thanks to David Winterbottom (@codeinthehole). See https://twitter.com/codeinthehole/status/1346774847221870593
| #!/usr/bin/python | |
| import sys | |
| import datetime | |
| # Calculates death probabilities based on Social Security | |
| # actuarial tables for a given group of people. | |
| # Run with a list of ages/genders and an optional timespan (or year in the future): | |
| # python actuary.py 63m 80m 75f 73m 10 |