[R] How to use ggpattern to add patterns to ggplot2 plots
A guide on how to use the ggpattern package to add various patterns to ggplot2 plots, including installation, basic usage, and customizing pattern parameters.
Understanding the Z-Algorithm for Efficient String Matching
A deep dive into the Z-algorithm for linear-time string matching, focusing on the mirroring strategy.
[R] How to change legend key size in ggplot2
A quick tip on how to change the legend key size independently of text size in ggplot2.
Single vs Double Quotes in Command Line and R
When feeding a program with command line arguments, single quotes and double quotes make a significant difference.
The Shell Rule Single quotes (') do not allow escaping any characters; the contents are treated literally. Double quotes ("), however, allow for character escaping and variable expansion.
You can test this using the printf command, which prints each argument it receives on a new line:
1 2 3 4 5 6 7 # Using single quotes: the backslash is literal printf "%s\n" '\+hello' # Output: \+hello # Using double quotes: the shell escapes the double backslash printf "%s\n" "\\+hello" # Output: \+hello As you can see, both commands result in the same string \+hello being passed to the program.
[AI] Creating Custom Agent Skills with Gemini CLI: A Step-by-Step Guide
Learn how to extend Gemini CLI by creating custom agent skills with specialized workflows and templates.
[R] How to modify the theme used by blogdown?
My website is built using blogdown and published on Netlify via CI/CD. Recently, I updated my Hugo version from 0.92 to 0.154.2. Unfortunately, this update broke the deployment pipeline due to an incompatibility in one of the files within the diary theme.
When your Hugo theme is no longer compatible with a newer Hugo version or if you simply want to customize its behavior, there are two primary ways to handle it.
[AI] How to effectively use AI agents: a lesson learned from paper summary skills
Like many scientists and engineers, I have been working hard to leverage AI to boost my productivity by automating routine tasks—such as writing LinkedIn posts to summarize research papers—and generating code so that I don’t have to memorize every syntax.
However, I have mixed feelings about the power of AI tools like Claude Code, Gemini CLI, or Qwen-code. On one hand, they are incredibly effective at generating ideas I hadn’t considered, such as finding the perfect word to refine my meaning.
[VS code] How to use Google Colab in VS Code
Recently I found that I can use Google Colab in VS Code, which is very convenient. In this post, I will show how to do it.
Install Google Colab extension First, you need to install the Google Colab extension for VS Code.
You can find the extension by searching the Extensions view in VS Code for “Google Colab” and then install it, as below:
Collect to Colab Restart VS Code after installing the extension, and then open a Jupyter notebook file (.
[Python] Install quarto in Windows
Quarto is a popular tool for creating dynamic documents, reports, presentations, and websites using markdown and code. It supports multiple programming languages, including Python, R, and Julia.
When I installed it in my Windows, I found some challenges to make it find correct python in different environments, so I would like to share my experience here to help you.
Installation You can download the installer for Windows from the official Quarto website: https://quarto.
[R] Setting Up an Interactive R Shiny Plotting App
I have an ieda of creating a shiny app to create all kinds of plots interactively, so that users can choose their color, symbols, etc, which is very useful for data exploration and make a publication-quality figure.
Today, I make it and published it at https://fortune9.shinyapps.io/interactive_plot/. The source code is at github https://github.com/fortune9/interactive_plot.
This guide focuses on the infrastructure setup for creating and deploying an interactive plotting application using R Shiny.