Who owns data on you? Google Maps has tracked nearly every location you’ve been in the last decade. But you cannot query it in any way. Have you ever wanted to know: “How many times have I been to the gym this week?” or “How many days did I spend in California this year?” You…
All posts by theptrk
python reference sheet
[list] -> [list] [list] -> num
Install, Upgrade Postgres on Mac with homebrew
There are many options to install Postgres. Here we use “homebrew” (brew.sh). How to: Install Postgres on Mac with brew GOTCHA: “Wait, I just installed an older Postgres version(postgresql@14)? If you don’t specify a Postgres version, it downloads a default version that might not be the newest version or an older target version. How to:…
Timer in Terminal
main.py activate_terminal.scpt
Github Authentication with SSH on Mac
“Support for password authentication was removed on August 13, 2021.” – Github You have many options to authenticate with GitHub Why use SSH Authentication? (docs.github) How to setup SSH Authentication? Note: The HTTPS and SSH addresses are different
openai embeddings in python with asyncio and gather
Async version: Sources
Django jupyter notebook in vscode
Django jupyter notebook in browser
How do you start a jupyter notebook with all the django settings working? Step 1: Install shell_plus from django-extensions Step 2: start shell_plus with –lab Note: old documentation may suggest “–notebook” Also:
How to avoid overwriting files in python
Strategy 1: increment a suffix so like “file.pdf(1)” Version: Simple Version: Guards against race conditions The above is safe if there is only one process writing to the location but it can include a race condition. This is the safer version that “opens” the file. Strategy 2: attach a timestamp
Removing stopwords with NLTK
Code with explanations: Just the code