Skip to content

Instantly share code, notes, and snippets.

Tag ID Data Object Name Value / Description
00 Payload Format Indicator 01 (EMVCo Version 1.1)
01 Point of Initiation 11 (Static) or 12 (Dynamic)
26 Merchant Account Info [MASTER ACQUIRER CONTAINER]
The "Universal Pipe" that handles all traffic.
  ↳ 00 Global Unique ID (GUID) SG.COM.NETS
(Identifies NETS as the Master Switch)
  ↳ 01 Merchant ID 1122334455
(The unique ID of the merchant in the NETS system)
  ↳ 02 Service ID 000
(Service classification, if applicable)
52 Merchant Category Code 5814 (Fast Food Restaurants)
53 Transaction Currency 702 (SGD)
@sausheong
sausheong / SGQR.md
Last active November 22, 2025 16:38
Tag ID Data Object Name Value / Description
00 Payload Format Indicator 01 (EMVCo Version 1.1)
01 Point of Initiation 12 (Dynamic QR - Price is included)
26 Merchant Account Info [START PAYNOW CONTAINER]
This tag contains sub-tags specific to PayNow.
  ↳ 00 Global Unique ID SG.PAYNOW (Identifies scheme as PayNow)
  ↳ 01 Proxy Type 2 (Indicates recipient is a UEN/Business)
  ↳ 02 Proxy Value 1234567A (The Merchant's UEN)
  ↳ 03 Editable Amount 0 (Amount is fixed/not editable by user)
52 Merchant Category Code 5812 (Restaurants/Eating Places)
Tag ID Data Object Name Description
00 Payload Format Indicator Defines the version of the QR standard (usually version "01").
01 Point of Initiation Method 11: Static (Sticker)
12: Dynamic (Screen)
02-51 Merchant Account Info Routing data for payment processors (Visa, Mastercard, UPI, etc).
52 Merchant Category Code 4-digit code classifying the business type (e.g., 5812 for Restaurants).
53 Transaction Currency ISO 4217 currency code (e.g., "840" for USD).
54 Transaction Amount Total price. Mandatory in Dynamic codes.
58 Country Code ISO 3166 country code (e.g., "US", "SG").
59 Merchant Name Display name (e.g., "Joe's Coffee").
@sausheong
sausheong / surveys.csv
Created October 27, 2024 07:02
AI Coding Assistant Surveys by Companies
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 4.
Study Name,Year,Number of Developers,Coding Assistant(s),Method,Productivity Improvement,Key Findings,Link
GitHub Copilot Survey,2022,"2,000+",GitHub Copilot,Survey,55% reported increased productivity,"- 88% felt more productive overall
- 74% could focus on more satisfying work
- 77% spent less time searching for information or examples",https://github.blog/news-insights/research/research-quantifying-github-copilots-impact-on-developer-productivity-and-happiness/
McKinsey Developer Productivity Survey,2022,"1,000+",Various AI-powered tools,Survey,Up to 45% increase,"- AI tools could automate up to 30% of daily tasks
- Productivity gains most significant for entry-level developers",https://www.mckinsey.com/capabilities/mckinsey-digital/our-insights/unleashing-developer-productivity-with-generative-ai
GitHub Copilot Survey,2023,500,Various AI Coding Tools,Survey,57% of developers found AI tools beneficial for skill development and productivity,"- 92% of developers use AI tools
- 81% expect AI to enhance collabo
  1. Callout: Use python directive to call Python statements. Enclose the Python statement in square brackets []. Example: python[print('hello world')] will call the Python statement print('hello world').

PromptScript is a pseudolanguage designed to structure and clarify interactions with AI models like GPT-4. It allows users to express complex tasks, rules, and heuristics, helping the AI understand the tasks more accurately.

  1. Directives: These set the context for an instruction. Begin a directive with #. The following directives can be used: #story, #technical, #informal, #formal. Use #heuristic when defining heuristics. Example:

    #technical 
    explain {quantum physics}
    
  2. Action Words: Standard English verbs that define the task for the AI. These include but are not limited to describe, explain, list, summarize. Example: describe {the Eiffel Tower}

func (h *Heap) rearrange(i int) {
...
if left < size && h.elements[left-1] > h.elements[largest] {
largest = left
}
...
}
func FuzzHeap(f *testing.F) {
var h *Heap = &Heap{}
h.elements = []int{452, 23, 6515, 55, 313, 6}
h.Build()
testCases := []int{51, 634, 9, 8941, 354}
for _, tc := range testCases {
f.Add(tc)
}
func TestHeap(t *testing.T) {
var h *Heap = &Heap{}
h.elements = []int{452, 23, 6515, 55, 313, 6}
h.Build()
testCases := []int{51, 634, 9, 8941, 354}
for _, tc := range testCases {
h.Push(tc)
// make a copy of the elements in the slice and sort it in descending order
elements := make([]int, len(h.elements))
type Heap struct {
elements []int
}
func (h *Heap) Push(ele int) {
h.elements = append(h.elements, ele)
i := len(h.elements) - 1
for ; h.elements[i] > h.elements[parent(i)]; i = parent(i) {
h.swap(i, parent(i))
}