Skip to content

Instantly share code, notes, and snippets.

View hrchu's full-sized avatar
:octocat:
Have an Octotastic day!

petertc hrchu

:octocat:
Have an Octotastic day!
View GitHub Profile
@hrchu
hrchu / tw.md
Last active September 2, 2026 10:13
what are linguistic issues in Taiwan languages that are typically misunderstood, misrepresented in state of the art AI models

What are linguistic issues in Taiwan languages that are typically misunderstood, misrepresented in state-of-the-art AI models

Taiwan-specific linguistic issues and risks

Linguistic issue Taiwan-specific manifestation Typical AI/model failure mode Resulting risk in Taiwan
Hokkien–Mandarin code-mixing and non-standard Han characters Hokkien sexual or abusive expressions written with borrowed Han characters (e.g., non-standard spellings that encode explicit sexual acts) Fails to recognize semantic equivalence to explicit Mandarin sexual or abusive vocabulary; classifies as benign or weakly sensitive Unflagged sexual and abusive content, especially harmful to minors and to services that rely on lexical-level filters
Traditional Chinese mixed with Zhuyin and informal symbols Use of 注音符號 (Zhuyin), emoji, and stylized text interspersed with Traditional Chinese characters in everyday writing Cannot robustly normalize or interpret mixed-script strings; harmful
@hrchu
hrchu / note.md
Created August 5, 2026 07:33
COSCUP 2026 火箭控制 Workshop|行前準備
@hrchu
hrchu / prism-paper-review-skill.md
Last active March 27, 2026 11:28
prism paper-review skill

Run the local paper-review skill bundle exactly as if the user uploaded and invoked it directly.

Use SKILL.md as the authoritative workflow.

Use the bundled reference files and script files as part of the invoked skill context.

Do not substitute a fallback workflow or omit any bundled instructions.

For this invocation, write the review to paper-reviews/review-2026-03-26-001243.tex.

@hrchu
hrchu / policy.md
Last active December 16, 2025 02:20
gpt-oss-safeguard with MLCommons taxonomy of 13 hazards

Policy Definitions

Key Terms

Prohibited Content: Any response that enables, encourages, endorses, or meaningfully facilitates activities categorized under S1–S14 below.

Sensitive Personal Information: Nonpublic data that could compromise an individual’s safety, privacy, or security.

Specialized Advice: Professional guidance (financial, medical, legal) requiring licensed expertise or that may cause harm if followed incorrectly.

[
{
"session_id": "E9UKFQ",
"room": "TR511",
"start_time": "2025-08-09T14:00:00+08:00",
"end_time": "2025-08-09T14:30:00+08:00",
"session_name": "AI may not imitate Handmake - why sake/wine/craft beer are not make by 'Robots'",
"speaker_names": [
"Masafumi Ohta"
]
@hrchu
hrchu / auto_translate_submissions.py
Created July 18, 2025 07:48
COSCUP 2025 pretalx submission translate
"""
Script to automatically translate and fill missing translated titles and
abstracts for non-English submissions using DeepL API.
Flow:
1. Iterate all submissions or a specific submission
2. Filter those where language is not English and translated title/abstract
is empty
3. Read original title/abstract, translate using DeepL, and fill the answers
4. Update submissions with the translations
@hrchu
hrchu / dazzcam.md
Last active October 10, 2024 03:22
Dazz Cam cameras description

Here’s the classification based on your categories, with highlights for each camera model:

VINTAGE 135 (35mm film cameras)

  1. 135 NE35mm Slide Film
    Highlight: Film designed to produce high-quality slides for projection or scanning.

  2. 135 SRLomo Sprocket Rocket
    Highlight: A panoramic camera that exposes sprocket holes on the film, creating unique images.

  3. Classic USLR, possibly Leica R3

@hrchu
hrchu / tx_sales_chart.py
Created August 6, 2024 07:38
pycon tw 2024 tx sales trend
import matplotlib.pyplot as plt
from statsmodels.tsa.holtwinters import ExponentialSmoothing
import numpy as np
# 1. 數據準備
# 2024年銷售數據(從第8天開始)
sales_data_2024 = [34, 66, 68, 70, 73, 75, 79, 83, 88, 92, 94, 98, 102, 109, 112, 113, 117, 118, 120, 121, 122, 123, 128, 136, 140]
sales_data_2024.extend([142, 146, 149, 154, 155, 161, 164, 167, 171, 175, 180, 183, 187, 202, 209, 214, 219, 221, 221]) # Aug 8 added
# 2023年銷售數據
@hrchu
hrchu / S3OutpostsBucket.java
Last active May 31, 2024 02:00
Example code of operating S3 on Outposts with AWS Java SDK v2. Checkout AWS offical document for using v1: https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3OutpostsCreateAccessPoint.html
import software.amazon.awssdk.auth.credentials.ProfileCredentialsProvider;
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.s3control.S3ControlClient;
import software.amazon.awssdk.services.s3control.model.*;
import java.util.stream.Collectors;
public class S3OutpostsBucket {
public static void main(String[] args) {
// Enable debug-level logging for the AWS Java SDK v2
@hrchu
hrchu / prompt_generate_500_tokens
Created May 15, 2024 03:19
prompts to benchmark GPT token per second
generate 500 token story