Skip to content

Instantly share code, notes, and snippets.

@Choumingzhao
Choumingzhao / force-gpt4o-mini.user.js
Last active December 7, 2024 17:59
UserScript to Force using GPT4o-mini in ChatGPT.
// ==UserScript==
// @name Force GPT-4o-mini
// @namespace altbdoor
// @match https://chatgpt.com/*
// @grant GM.setValue
// @grant GM.getValue
// @version 1.9
// @author altbdoor(original) and Choumingzhao(current edit)
// @run-at document-start
// @updateURL https://github.com/altbdoor/userscripts/raw/master/force-gpt3.user.js
@Choumingzhao
Choumingzhao / zsh_duplicate_conda_venv_name.md
Created July 1, 2025 07:24
How to fix duplicate conda venv names in zsh prompt?

📛 Title:

Avoid Conda (base) in Zsh but Keep It in Bash (Oh My Zsh + Conda Prompt Fix)


📄 Description:

How to prevent Conda from prepending (base) to your Zsh prompt while keeping it in Bash. This is useful when using a custom prompt like Oh My Zsh that already shows Conda/venv info, avoiding redundant display like (base) 🐍 base.

@Choumingzhao
Choumingzhao / evalscript_for_maoming_flood.js
Last active February 4, 2026 09:29
Evalscript for the mapping of flood on 2023.10 in Maoming, Guangdong., PRC
//VERSION=3
// This is a simple adoption from Sentinel-hub use case from [https://custom-scripts.sentinel-hub.com/sentinel-1/flood_mapping/]
// To share a long evalscript, we need a public url. Github Gist's raw url is nice way.
var beforeflood_date = "2023-10-12"; var duringflood_date = "2023-10-24";
function setup() {
return {
input: [{
bands: [
"VV"
]
@Choumingzhao
Choumingzhao / CopyNotify.md
Last active February 9, 2026 06:45
AutoHotkey v2: Visual Notification for Ctrl+C Clipboard Copies

Visual Notification for Ctrl+C Clipboard Copies using AHK v2

A lightweight AutoHotkey v2 script that provides visual feedback (Tooltip) when you copy text using the Ctrl+C shortcut.
Key Features:

  • v2 Syntax: Fully compatible with AutoHotkey v2.0+.
  • User-Centric: Specifically checks for the Ctrl key state so it doesn't trigger when background apps change your clipboard.
  • Non-Intrusive: Uses a temporary ToolTip that follows the mouse and disappears automatically.

How to use:

  1. Install AutoHotkey v2.
  2. Create a new .ahk file and paste the code.
@Choumingzhao
Choumingzhao / get_critical_r.py
Created March 30, 2026 08:34
Calculate the critical value of Pearson's r for a given alpha and sample size.
import scipy.stats
from math import sqrt
def get_critical_r(alpha, n, two_tailed=True):
"""Calculate the critical value of Pearson's r for a given alpha and sample size.
Args:
alpha: The significance level.
n: The sample size.
two_tailed: Whether to return a two-tailed critical value.