Skip to content

Instantly share code, notes, and snippets.

@Mfpfox
Mfpfox / news.py
Created May 10, 2025 22:24 — forked from RhetTbull/news.py
Extract your "Saved Stories" articles from the Apple News app on macOS (thanks to @eecue who wrote much of this)
"""Get your "Saved Stories" articles from Apple News
Thanks to Dave Bullock (https://github.com/eecue) who's idea this was and who wrote the extract_info_from_apple_news function
This script requires the following modules be pip installed:
* bs4
* requests
Save this script to a file called news.py and run it with Python 3.9 or later
@Mfpfox
Mfpfox / 1-Template.md
Created November 13, 2020 22:08 — forked from larsenwork/1-Template.md
Bug Reports

Steps to reproduce

  1. Write here
  2. Write here
def checkColumnValues(df, col):
# displays col value counts
print(df[col].value_counts().reset_index().rename(columns={'index':col, col:'Count'}))
def saveColumnValues(df, col, outname):
# saves col counts as csv
v = df[col].value_counts().reset_index().rename(columns={'index':col, col:'Count'})
v.to_csv(outname, index=False)
print("saved!")
print()