High level flow of recurring product Django entities vs Stripe entities On the django side you’ll need a user column to store the tier of your user With stripe, you interact based on their entities. Note: below you only own “Django user” Concept Purpose Customer Represents our Django user on Stripe Product + Price Recurring…
All posts in python
Todo list in postgres (python)
Timer in Terminal
main.py activate_terminal.scpt
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:
Removing stopwords with NLTK
Code with explanations: Just the code
How to write files and read files in python
In short How would you optimize saving expensive API calls? Explanation Say you have a function with output you want to save. It could be from: Step: Create the directory you are saving to. I usually write to the system tmp directory or a project tmp tmp directory and put “tmp” in my gitignore so…
How to time a function in python (bonus: intervals ⏱️)
Method 1: use time.time() and do calculations Method 2: Create a Timer class that stores the start time and last time recorded
Chunking text
These are basic chunking utilities for quickly getting large text blocks into smaller chunks. Starts with Character based, then Word base, then Sentence based chunking.