Eric J Ma's Website

« 2 3 4 5 6 »

The importance of skip-level 1:1s

written by Eric J. Ma on 2023-10-24 | tags: work relationships feedback conflict resolution meetings organizational dynamics team building career development transparency professional growth

In this blog post, I discuss the importance of regular 1:1 meetings and the benefits of 'skip-level' 1:1s, where you meet with your direct manager's manager. These meetings provide a broader perspective, facilitate understanding of organizational dynamics, and contribute to a culture of transparency and mutual respect. They are beneficial for both individual contributors and managers, fostering personal and organizational growth. If you're a team lead, encouraging your team members to engage in skip-level 1:1s demonstrates great leadership. Curious about how these meetings could transform your work routine and relationships?

Read on... (602 words, approximately 4 minutes reading time)
How to run Ollama with LlamaBot

written by Eric J. Ma on 2023-10-22 | tags: python large language models llms gitbot zotero library local llms ollama langchain openai gpt-4 prompt engineering llamabot

In this blog post, I explore the integration of local Large Language Models (LLMs) with my LlamaBot project using Ollama. I discuss how Ollama simplifies the setup of local LLMs and demonstrate how to use Ollama models with LlamaBot. I also share a quick demo with Zotero chat using Ollama models. While OpenAI's GPT-4 remains the benchmark, local models offer cost-free alternatives. Curious to read more?

Read on... (508 words, approximately 3 minutes reading time)
How to ensure that bump2version only updates the correct string

written by Eric J. Ma on 2023-10-18 | tags: bump2version version control pyproject.toml configuration pattern matching patch release dependencies llamabot pyds-cli problem solving

In this blog post, I share a solution to a problem I encountered with bump2version, where it was incorrectly updating all pattern-matched strings instead of just the version number. I found that by modifying the .bumpversion.cfg file, I could ensure only the version number was updated. This has been a game-changer for me and I'm excited to implement it into my pyds-cli default project templates. Curious about how this could streamline your own version control process? Read on to find out more!

Read on... (151 words, approximately 1 minute reading time)
How I made a local pre-commit hook to resize images

written by Eric J. Ma on 2023-10-14 | tags: pre-commit pre-commit hook automation python python script software development data science dalle-3 til

In this blog post, I share my experience creating a custom pre-commit hook for resizing images within a repository. This hook automates the process of ensuring all logos meet a defined width, saving time and maintaining consistency. It uses Python and integrates with the pre-commit framework, running in an isolated environment to keep the main project clean. I also discuss the potential of distributing these hooks for wider use. Curious about how you can automate checks and streamline your development process with pre-commit hooks?

Read on... (667 words, approximately 4 minutes reading time)
When to write tests for your data science code

written by Eric J. Ma on 2023-10-10 | tags: datascience testing machine learning best practices production research exploratory analysis

In this blog post, I discuss the importance of testing in data science code. I explain how research code can transition into production code and the potential implications of errors or oversights. I suggest three levels of testing: adding assertions within your notebook, migrating code into functions and testing them, and refactoring code into a library with associated test functions. By testing and refactoring our code, we can ensure its accuracy and reliability. Are you curious to see how you can test your code as a data scientist?

Read on... (842 words, approximately 5 minutes reading time)
Check docstrings blazing fast with pydoclint

written by Eric J. Ma on 2023-10-09 | tags: coding documentation darglint docstrings tools technologies pydoclint pyjanitor continuous integration til

In this blog post, I discuss the importance of documenting code and the risks of using outdated tools like darglint. I introduce pydoclint as a faster alternative and share a case study of how it solved a problem for the pyjanitor project. I provide instructions on getting started with pydoclint and highlight its default configurations. As a data scientist and tool developer, I'm always on the lookout for better tools, and pydoclint promises a smoother experience. Are you ready to embrace the future with pydoclint?

Read on... (394 words, approximately 2 minutes reading time)
It's time to upgrade to Ruff

written by Eric J. Ma on 2023-10-09 | tags: python ruff tips and tricks rust pre-commit

In this blog post, I discuss the benefits of using Ruff, a blazing fast linter for Python code. With its speed and performance, Ruff can significantly reduce linting and code style checking times. It is written in Rust, known for its performance and safety features. I provide step-by-step instructions on how to integrate Ruff into your workflow, including installing the pre-commit hook and configuring Ruff in pyproject.toml. If you're looking to improve the quality and efficiency of your Python codebase, give Ruff a try. Are you ready to switch to Ruff and experience lightning-fast code checking?

Read on... (349 words, approximately 2 minutes reading time)
VSCode Tip: Cmd+P lets you switch to any file within a repository

written by Eric J. Ma on 2023-10-08 | tags: vscode tips and tricks til navigation repository productivity

In this blog post, I share a quick tip for using VSCode. I show how to easily locate and open any file within a repository using the Command Palette. By typing keywords in the file-browsing mode, you can quickly narrow down the exact file you want to open. Have you ever struggled to find a specific file in VSCode? Read on to discover this time-saving trick!

Read on... (109 words, approximately 1 minute reading time)
How to choose a (conda) distribution of Python

written by Eric J. Ma on 2023-10-07 | tags: conda anaconda miniforge python distribution data science pip tooling python

In this blog post, I discuss the differences between the Anaconda, Miniconda, and Miniforge distributions of Python. Anaconda is the official distribution from Anaconda and comes with a wide range of data science packages. Miniconda is a smaller version of Anaconda, intended for use in Docker containers. Miniforge, developed by the conda-forge team, pulls packages from the conda-forge repository and includes mamba. The choice of distribution depends on your needs and preferences, with Miniforge being recommended for lightweight and open-source use, and Anaconda for enterprise support and backing the Python open source world.

Read on... (790 words, approximately 4 minutes reading time)
How to use Python functions as a template engine for prompts

written by Eric J. Ma on 2023-10-06 | tags: python llm gpt-4 coding outlines llamabot jinja2 prompt management chatbots

In this blog post, I explore the use of Outlines for prompt management in Python, specifically for LlamaBot. However, due to its heavy dependencies, I decided to reimplement the functionality using GPT-4 as a coding aid. The result was a successful reimplementation that allowed me to organize prompts within .py source modules more easily. A lesson from this experience. is the importance of clarity in programming even when we're using LLMs to help us code.

Read on... (913 words, approximately 5 minutes reading time)
« 2 3 4 5 6 »