Eric J Ma's Website

« 13 14 15 16 17 »

How to configure a minimum Python version in pyproject.toml

written by Eric J. Ma on 2023-07-12 | tags: til python python310 pythonversioning pyproject.toml pythontips llamabot

In today's blog post, we dive into setting the minimum and maximum Python versions in `pyproject.toml` 🐍. We explore how this impacts `llamabot` and discuss the new syntax for indicating the union of types in Python 3.10. This new syntax is visually easier to understand, making our coding journey a bit smoother! 🚀👩‍💻👨‍💻

Read on... (130 words, approximately 1 minute reading time)
Automatically write awesome commit messages

written by Eric J. Ma on 2023-06-20 | tags: git commit messages gpt-4 llamabot cli tool openai api conventional commits collaboration project management debugging code review versioning machine learning outlines library coding bot

Tired of writing boring commit messages? 😴 I've got you covered! Introducing `llamabot`, a CLI tool that uses GPT-4 to craft meaningful commit messages following the Conventional Commits specification. 🚀 Improve collaboration, project management, and debugging with just one command! 🌟 Try it out with `pip install llamabot`. 🦙

Read on... (565 words, approximately 3 minutes reading time)
Outlines: LLM prompt management and more

written by Eric J. Ma on 2023-06-16 | tags: outlines python coding bot ghostwriting docstrings unit tests prompt management composable prompts llamabot gpt-4 code generation ui design jinja2 clean code

Today, I explored the `outlines` library and built a coding bot that ghostwrites code, docstrings, and tests! 🤖 With clean prompt design, I was able to create a compact and efficient Python program. The best part? It's super easy to map this to a user interface! 🎉 Check out how I did it and learn about the benefits of using `outlines` for prompt management. 😄

Read on... (1588 words, approximately 8 minutes reading time)
How to Craft Stellar Pull Request Summaries with GPT-4

written by Eric J. Ma on 2023-05-13 | tags: gpt4 pull requests code review python llamabot github automation machine learning ai coding programming data science nlp open source software development

Today, I discovered a fantastic use for GPT-4: writing improved pull request messages! 🎉 I used a Python package I developed, llamabot, to generate summaries for pull requests. The results were impressive, making the task of reviewing PRs with long diffs much less daunting. 😌

Read on... (653 words, approximately 4 minutes reading time)
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... (531 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... (655 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... (1104 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... (163 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... (2039 words, approximately 11 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... (4038 words, approximately 21 minutes reading time)
« 13 14 15 16 17 »