Check out this github repo: https://github.com/theptrk/cachedgpt It’s a single file server that uses FastAPI to cache your calls to save on resources while you are developing. A hidden benefit, all responses return INSTANTLY on the second call.
OpenAI ChatCompletion in Python
Use pyenv and a .python-version file
Problem: Have you ever downloaded someones project and ran into python versioning issues? Solution: You need to pin the python version for every project How? pyenv will recognize a .python-version file and use the python version that you pinned for your project, directory or system. This is massively useful when working across different machines and…
How to download and examine a file on the command line
How to download a file on the command line You have many choices but two popular ones are curl and wget. Example with curl: Now you have a file at your current directory! How to examine a file on the command line Get the permissions and size of the file (ls -lh) Look through the…
Goodbye Outstandem
I worked on Outstandem for 10 years and it’s time to say goodbye. When I was looking for my first real job in 2012, I kept every application in an excel sheet. Every stage in the interview process was tracked in Excel but I knew it could all be better. Every time my career counselor…
How to earn free boba for life
We all deserve boba (“bubble tea”). This incredible drink invention is one of Taiwans greatest gifts to the world. Boba costs about $5 at your neighborhood shop. Treat yourself to one boba a week for $5 per week or $260 per year. So how do you earn free boba for life? You can earn money…
Setting up zsh on new computer
zsh is the new MacOS default From Catalina zsh is the default shell on Mac (apple). If you need to manually change your shell: You will be updating your config A LOT in the beginning, so the most important aliases are these. Option: Easy mode: download oh-my-zsh Skip the configuration and use a prebuilt framework:…
Cartoons for Machine Learning Coursera Andrew Ng: Week 1-5 V2
This is an updated and improved version of the original “AI Cartoons” from here (https://theptrk.com/2020/07/05/machine-learning-coursera-week-1-illustrations/). I love drawing these cartoons because it helps solidify the fundamentals and play with concepts in my mind. AI-Cartoons-Weeks-1-5-V2.pdf If you have feedback, I would love to chat on Discord here Thanks for Andrew Ng who sparked the interest in…
pytest (error): Requested setting ROOT_URLCONF, but settings are not configured
Trying to run pytest or coverage run -m pytest to test your Django code? The error is telling us that the code no longer knows how to find our settings module. Note that we are no longer using the manage.py command to deal with Django code and if you look at this file, one of…
Machine Learning Coursera Andrew Ng: Week 1 Illustrations
The Machine Learning course from Coursera with Andrew Ng is the best introduction to Machine Learning on the internet. These illustrated notes are from taking the course and letting the concepts solidify in my thoughts. Please enjoy.