Eric J Ma's Website

« 5 6 7 8 9 »

How to make Python context managers aware of their code

written by Eric J. Ma on 2023-05-02 | tags: python context manager llamabot code snippet contextvars programming til

I’ve been working on llamabot and wanted to implement a feature to automatically record prompts and LLM responses. I used a PromptRecorder object with a context manager, similar to PyMC’s pm.Model(). However, I faced a challenge: making the context manager aware of its internal code. 🤔 After some research, I found a solution using the built-in contextvars module. By creating a globally-referenceable prompt_recorder variable, I was able to modify the instantiated PromptRecorder object’s state and call its methods while keeping it hidden from the front-end code. 🎉 Now, llamabot can easily record prompt-response pairs! 🤖

Read on... (489 words, approximately 3 minutes reading time)
How to use NumPy's where function with JAX's vmap

written by Eric J. Ma on 2023-04-29 | tags: chromatography numpy jax vmap lax programming tips coding til

🧐I encountered a tricky problem when working on chromatography: I needed to find x-values on concave curves at a specific height without solving simultaneous equations. Check out my blog post 📝 to see how I went from a simple for-loop solution to using JAX's vmap for a more effective, expressive, and compatible solution. This was a fun programming problem to solve! 🔎📈📊😃

Read on... (638 words, approximately 4 minutes reading time)
LLaMaBot: An opinionated, Pythonic interface to Large Language Models

written by Eric J. Ma on 2023-04-12 | tags: llms large language models chatbot llm fastapi panel software development llamabot

🤖 I've been playing with Large Language Models and found some common patterns. 🧠 So, I created a new package called llamabot! 😎 It lets you make your own Python LLM bot, all with just a few lines of code. 🌬️ It should make experimenting a breeze! 🚀 Are you curious? Read on!

Read on... (1096 words, approximately 6 minutes reading time)
How to programmatically download a file from Dropbox using Requests

written by Eric J. Ma on 2023-04-11 | tags: python dropbox file download programming requests library data storage jupyter notebooks portability internet connection content delivery personal cdn data files tutorials linux wget

Today, I cracked the code on downloading files from Dropbox programmatically! 🎉 Using Python and the Requests library, I can now store large data files for my tutorials on Dropbox, making my Jupyter notebooks portable and internet-friendly. 🌐 It's like having my own personal CDN! 💽

Read on... (162 words, approximately 1 minute reading time)
Mastering LinkedIn Connections: Avoid Mistakes & Boost Your Professional Network

written by Eric J. Ma on 2023-04-02 | tags: linkedin professional networking connection mistakes profile optimization value exchange mentorship career development personalized messages networking tips

Are you looking to improve your LinkedIn game? 🚀 In this blog post, I explore the best practices and common mistakes when connecting with others on LinkedIn. Learn how to create quality connections, avoid cold connecting without a note, and ensure your profile is up-to-date! 💼 I also share examples of great LinkedIn messages and resources to help you connect like a pro. Don't miss out on these valuable tips to enhance your professional network! 🌐🤝

(Summary was written by GPT-4 and edited by me.)

Read on... (1956 words, approximately 10 minutes reading time)
A Developer-First Guide to LLM APIs (March 2023)

written by Eric J. Ma on 2023-03-29 | tags: llms large language models gpt gpt4 openai langchain llama_index

I built one application using three different GPT libraries 📚, and figured out that it can give me a 100X ROI! 💰 In this blog post, I compare their outputs, developer experiences, and ⏰ discuss how future application developments may look. Curious about the future of GPT and its value proposition? 🚀

(The summary and title were generated by GPT-4 and edited by me.)

Read on... (3890 words, approximately 20 minutes reading time)
Arc Browser: First Impressions

written by Eric J. Ma on 2023-03-25 | tags: tools productivity arc browser browser browser review ui design user experience tab management workspace focus internet browsing web development browser features tech review web tools online workspace internet tools

Just tried out the Arc browser and I'm loving it! 😍 It's a game-changer for tab management and focus. With features like expiring tabs, tab spaces, and a side-by-side view, it's like having a personalized workspace right in my browser. 🚀 Even has a developer mode for locally hosted sites. Can't wait to see where they take this!

Read on... (1035 words, approximately 6 minutes reading time)
OKRs are a pacing tool, not a contract

written by Eric J. Ma on 2023-03-12 | tags: management performance management okrs objectives key results

How can a 15th-century explorer teach us about modern goal-setting strategies? In this blog post, I explore Andy Grove's part-historical, part-fictional take on Christopher Columbus in his quest to find a trade route to the Far East. By looking at Columbus' story through the lens of Grove's book "High Output Management," we can learn that OKRs are not a contract but something more useful... Come check out what I learned recently while listening to High Output Management!

Read on... (367 words, approximately 2 minutes reading time)
How to automate the creation of Google Docs with Python

written by Eric J. Ma on 2023-03-08 | tags: python google docs automation markdown html programming api google drive google cloud service account environment variables mimetype permissions templating jinja

I've just automated the creation of Google Docs using Python! 🐍 I used a Google service account to authenticate, then created the doc content using Markdown. I converted the Markdown to HTML, then uploaded it as a Google Doc. I also learned how to set multi-line environment variables and programmatically set document permissions. It was a fun and enlightening project! 🎉

Read on... (2534 words, approximately 13 minutes reading time)
Building a Translation App with GPT-3: The Story Behind My Creation

written by Eric J. Ma on 2023-02-05 | tags: gpt3 openai python blogging natural language processing machine learning artificial intelligence data science programming api dokku digitalocean deployment web app large language models translation faith christianity bible

I built a translator using GPT3 for Ark Channel, a daily devotional written in Chinese. The translator parses the text into structured data, translates the devotional and additional texts, and generates cover images.

I also built a UI using Panel and deployed it on a Dokku server on DigitalOcean. The result? My translation time went from 10-15 minutes to just 2! 🚀

Read on... (2420 words, approximately 13 minutes reading time)
« 5 6 7 8 9 »