If you are working with computing and don't have access to [[O'Reilly]] (previously known as Safari Books Online), you are probably not moving as fast as you can. It's one of my favourite [[Online learning platforms]].
Change your habits. Start using books:
- Prefer it over Googling
- Prefer it over StackOverflow and `howdoi`
- Combine books with video courses
- Search for libraries in (like `pandas`, `urllib`, `argparse` or `logging`) to see how professionals use them (also see [[Searching on GitHub]])
- Highlight and export your highlights
- Work with your highlights in a Jupyter notebook and ultimately upload the notebooks to GitHub
There's also video courses. I always seem to understand the text better after I've seen a demonstration.
What's a safari, anyway?
> from Arabic safara "to travel"
## Exporting
You can export your notes to a CSV file. A fun and easy way to browse a CSV file is to use `xsv` and `fzf`:
```text
xsv table safari-annotations-export.csv | fzf
```
You can use something like `browsercookie` to help you download the CSV
automatically:
```python
from clint.textui import progress, puts
import blindspin
import browsercookie
import requests
jar = browsercookie.firefox()
url = 'https://www.safaribooksonline.com/a/export/csv/'
puts('\nWaiting for download to begin... (may take a while)')
with blindspin.spinner():
r = requests.get(url, stream=True, cookies=jar)
total_size = int(r.headers.get('content-length', 0))
filename = 'safari.csv'
with open(filename, 'wb') as out_file:
for chunk in progress.bar(r.iter_content(chunk_size=1024), expected_size=(total_size/1024) + 1):
if chunk:
out_file.write(chunk)
out_file.flush()
puts(f'File saved to {filename}\n')
```
Maybe put this thing in a [pex](https://github.com/pantsbuild/pex) or [shiv](https://github.com/linkedin/shiv) and run it in a cron job once in a while and send a push notification with [ntfy](https://github.com/dschep/ntfy) _just because you can_.
```text
safari.pex && ntfy send 'Downloaded Safari highlights CSV!'
```
Working with CSV data? My favourite tools are [tad](https://www.tadviewer.com/), [xsv](https://github.com/BurntSushi/xsv), [csvkit](https://csvkit.readthedocs.io), [[Pandas]] and SQLite.
[Readwise](https://readwise.io/) can also handle Safari Books Online.
## Python
Here are some of my favourite [[Python]] resources. If you check these out, you _will_ end up writing _beautiful_ Python code.
## [[Raymond Hettinger]]
- [Modern Python LiveLessons: Big Ideas and Little Code in Python](https://www.safaribooksonline.com/library/view/modern-python-livelessons/9780134743400/)
- [Beyond PEP 8 - Best practices for beautiful intelligible code](https://www.youtube.com/watch?v=wf-BqAjZb8M)
- [Transforming Code into Beautiful, Idiomatic Python](https://www.youtube.com/watch?v=OSGv2VnC0go)
- [Modern Dictionaries](https://www.youtube.com/watch?v=p33CVV29OG8)
## David M. Beazley
- [Python Distilled](https://learning.oreilly.com/library/view/python-distilled/9780134173399/).
## Brett Slatkin
- [Effective Python: 90 Specific Ways to Write Better Python](https://learning.oreilly.com/library/view/effective-python-90/9780134854717/)
- [Effective Python: 59 Specific Ways to Write Better Python](https://www.safaribooksonline.com/library/view/effective-python-59/9780134034416) and [Effective Python videos](https://www.safaribooksonline.com/library/view/effective-python/9780134175249/)
## Luciano Ramalho
- [Fluent Python](https://www.safaribooksonline.com/library/view/fluent-python/9781491946237/)
- [Fluent Python: The Power of Special Methods](https://www.safaribooksonline.com/oriole/fluent-python)
- [Think Like a Pythonista](https://www.youtube.com/watch?v=M4gPxbo6G6k) from PyBay2017.
## Kenneth Reitz
[Kenneth Reitz' blog](https://www.kennethreitz.org/).
Kenneth Reitz wrote Requests and creates APIs for humans. README driven development.
- [The Hitchhiker's Guide to Python](https://www.safaribooksonline.com/library/view/the-hitchhikers-guide/9781491933213/) by Kenneth Reitz and Tanya Schlusser
- [The Hitchhiker's Guide to Python! (online)](http://docs.python-guide.org)
## Miguel Grinberg
[Miguel Grinberg's blog](https://blog.miguelgrinberg.com).
- [Flask Web Development](https://www.safaribooksonline.com/library/view/flask-web-development/9781491991725/)
## William Wesley McKinney
William Wesley McKinney is one of the creators of [[Pandas]]. [Here is his blog](http://wesmckinney.com/archives.html).
- [Python for Data Analysis](https://www.safaribooksonline.com/library/view/python-for-data/9781491957653/)
## Mahmoud Hashemi
Author of [boltons](https://github.com/mahmoud/boltons) and a very cool logging framework called [lithoxyl](https://github.com/mahmoud/lithoxyl). Also, more recently: [glom](https://github.com/mahmoud/glom).
- [Enterprise Software with Python](https://www.safaribooksonline.com/library/view/enterprise-software-with/9781491943755/)
- [The Packaging Gradient](https://www.youtube.com/watch?v=iLVNWfPWAC8) from PyBay2017
## Harry J.W. Percival
- [Test-Driven Development with Python](https://www.safaribooksonline.com/library/view/test-driven-development-with/9781491958698/)
## Other
- [Python Cookbook](https://www.safaribooksonline.com/library/view/python-cookbook-3rd/9781449357337/)
- [Python Programming Language](https://www.safaribooksonline.com/library/view/python-programming-language/9780134217314/)
- [Mastering Object-oriented Python - Using ChainMap for defaults and overrides](https://www.safaribooksonline.com/library/view/mastering-object-oriented-python/9781783280971/ch13s07.html)
- [Modern Python Cookbook](https://www.safaribooksonline.com/library/view/modern-python-cookbook/9781786469250/)
- [Modern Python Solutions - Finding Configuration Files](https://www.safaribooksonline.com/library/view/modern-python-solutions/9781788297936/video3%5F1.html)
- [Modern Python Solutions - Making REST Requests Using urllib](https://www.safaribooksonline.com/library/view/modern-python-solutions/9781788297936/video2%5F4.html)
More specific:
- [REST APIs with Flask and Python](https://www.safaribooksonline.com/library/view/rest-apis-with/9781788621526/)
- [Pandas Data Analysis with Python Fundamentals](https://www.safaribooksonline.com/library/view/pandas-data-analysis/9780134692272/) by Daniel Y. Chen.
## Linux
If `man` is getting you down, try a book instead. Soak in some extra knowledge. Then read the [ArchWiki](https://wiki.archlinux.org/index.php/Man%5Fpage).
- [How Linux Works](https://www.safaribooksonline.com/library/view/how-linux-works/9781457185519/)
- [Red Hat Certified System Administrator (RHCSA) with Virtual Machines, Second
Edition](https://www.safaribooksonline.com/library/view/red-hat-certified/9780134723990/)
- [The Cathedral & the Bazaar](https://www.safaribooksonline.com/library/view/the-cathedral/0596001088/)
- [The Linux Command Line](https://www.safaribooksonline.com/library/view/the-linux-command/9781593273897/)
- [The Linux Programming Interface](https://www.safaribooksonline.com/library/view/the-linux-programming/9781593272203/). A great book. Also recommended by Kenneth
Reitz.
- [UNIX and Linux System Administration Handbook](https://www.safaribooksonline.com/library/view/unix-and-linux/9780134278308/)
- [Using Docker](https://www.safaribooksonline.com/library/view/using-docker/9781491915752/)
## Programming philosophy
- [Code Complete](https://www.safaribooksonline.com/library/view/code-complete-second/0735619670/)
- [The Pragmatic Programmer: From Journeyman to Master](https://www.safaribooksonline.com/library/view/the-pragmatic-programmer/020161622X/)
- [Pragmatic Thinking and Learning](https://www.safaribooksonline.com/library/view/pragmatic-thinking-and/9781680500196/)
- [Clean Code](https://www.safaribooksonline.com/library/view/clean-code/9780136083238/)
## Operations and monitoring
[[Site Reliability Engineering]]. I have not met anyone who has monitoring and alerting figured out. There is always some edge case that throw off all your dreams. Monitoring is tough!
- [Real-World SRE](https://learning.oreilly.com/library/view/real-world-sre/9781788628884/)
- [Training Site Reliability Engineers](https://learning.oreilly.com/library/view/training-site-reliability/9781492076018/)
- [Implementing Service Level Objectives](https://learning.oreilly.com/library/view/implementing-service-level/9781492076803/)
- [Building Secure and Reliable Systems](https://learning.oreilly.com/library/view/building-secure-and/9781492083115/)
- [Seeking SRE](https://learning.oreilly.com/library/view/seeking-sre/9781491978856/)
- [The Site Reliability Workbook](https://learning.oreilly.com/library/view/the-site-reliability/9781492029496/)
- [97 Things Every SRE Should Know](https://learning.oreilly.com/library/view/97-things-every/9781492081487/)
- [Effective Monitoring and Alerting](https://www.safaribooksonline.com/library/view/effective-monitoring-and/9781449333515/)
- [Practical Monitoring](https://www.safaribooksonline.com/library/view/practical-monitoring/9781491957349/)
- [Prometheus: Up & Running](https://www.safaribooksonline.com/library/view/prometheus-up/9781492034131/)
- [Site Reliability Engineering](https://www.safaribooksonline.com/library/view/site-reliability-engineering/9781491929117/)
- [Splunk Operational Intelligence Cookbook](https://www.safaribooksonline.com/library/view/splunk-operational-intelligence/9781785284991/)
- [The Art of Monitoring](https://www.safaribooksonline.com/library/view/the-art-of/9780988820241/)
- [Web Operations](https://www.safaribooksonline.com/library/view/web-operations/9781449377465/)
^disone
## Other
- [Code: The Hidden Language of Computer Hardware and Software](https://www.safaribooksonline.com/library/view/code-the-hidden/9780735634688/)
- [Ultimate Go Programming](https://www.safaribooksonline.com/library/view/ultimate-go-programming/9780134757476/)
- [Software Architecture Fundamentals Understanding the Basics](https://www.safaribooksonline.com/library/view/software-architecture-fundamentals/9781491901144/)
- [Software Architecture Fundamentals, Second Edition](https://www.safaribooksonline.com/library/view/software-architecture-fundamentals/9781491998991/)
- [Head First Statistics](https://www.safaribooksonline.com/library/view/head-first-statistics/9780596527587/)
- [Practical Vim](https://www.safaribooksonline.com/library/view/practical-vim-2nd/9781680501629/)
- [Modern Vim](https://www.safaribooksonline.com/library/view/modern-vim/9781680506006/)
- [Regular Expressions Cookbook](https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9781449327453/). Use this for fun overkill regex patterns that catch corner cases you'd never think of.
- [Mastering Bitcoin](https://www.safaribooksonline.com/library/view/mastering-bitcoin-2nd/9781491954379/) by [[Andreas M. Antonopoulos]].
## Alternatives?
Perhaps an open source HTML epub reader? You miss out on the discoverability though.
Let me know if you have any suggestions or have done something similar.
## Benefits
It's in your browser. That's also a downside. The browser becomes a better source of knowledge.
## Downsides
O'Reilly can data mine everything you read.