Skip to content

Instantly share code, notes, and snippets.

@kangks
kangks / mcp-registry.json
Last active March 27, 2026 05:23
Kiro governance
{
"servers": [
{
"server": {
"name": "git",
"description": "Git MCP server",
"version": "1.0.0",
"packages": [
{
"registryType": "pypi",
{"schema":"opencerts/v2.0","data":{"id":"8f75a957-c564-47bb-8b3b-fc08d7873be8:string:sg-edu-tp-134-A0L-2202564G-A0L","$template":{"name":"dcc68673-6607-4f01-aa8d-167a3335c0a8:string:sg/edu/tp/ftdip-2025","type":"1bf652cf-43b1-4d20-b881-b89beff286f0:string:EMBEDDED_RENDERER","url":"7d7676c4-370f-4635-839d-7fbc76fab443:string:https://apps.tp.edu.sg/ecert-viewer/"},"issuedOn":"17744da2-2a1a-404c-9398-b7066da00eb4:string:2025-04-20T00:00:00+08:00","expiresOn":"f0868290-7b82-43b4-8560-a306878daaf5:string:9999-12-31T23:59:59.997+08:00","admissionDate":"c45f97de-83ca-4513-a2b4-a0e780e295ba:string:2022-02-28T00:00:00+08:00","graduationDate":"af340043-bc95-4e3a-a381-fb09677849fa:string:2025-04-20T00:00:00+08:00","cumulativeScore":"0900f848-4c62-4c1d-8795-c338a3dfdd82:number:2.94","name":"e7c5656a-2323-4696-88b2-dcb7386be9ac:string:Diploma in Pharmaceutical Science","issuers":[{"name":"9d37429e-a731-4717-a318-c50cbf14fd25:string:Temasek Polytechnic","certificateStore":"423fea52-1934-489f-82f5-c0045e5c9177:string:0x4d05
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 2.
instance_type,model,Prompt,e2e_time(s),ttft(s),generated_text
c8g.24xlarge,deepseek-ai/DeepSeek-R1-Distill-Qwen-14B,1,168.12608194351200,8.629130601882940,"Okay, so I need to figure out how to split a $500,000 budget among three areas: warehouse expansion, delivery fleet upgrades, and last-mile distribution technology. Each has different ROI potentials, but also some constraints. Let me break this down step by step.\n\nFirst, I remember there are some constraints. There's an ongoing maintenance contract for the fleet that requires a minimum of $100,000. That's a fixed expense, so I can't go below that. Also, there's a regulatory guideline that says at least 10% of the budget must be set aside for sustainability improvements. Let me calculate that 10% of $500,000 is $50,000. So, I need to allocate at least $50,000 to sustainability.\n\nNow, the total minimum required for both the fleet and sustainability is $100,000 + $50,000 = $150,000. That leaves me with $500,000 - $150,000 = $350,000 to distribute among th
@kangks
kangks / 0_AWSPinpointEmailClient_PHPSdk.MD
Last active October 31, 2023 14:01
AWS PinpointEmailClient with SDK for PHP
  1. Download as zip with command curl -LJO https://gist.github.com/kangks/eda238bdee360070244ff9e53fc71312/archive/7ae513002e69388b438dd2b3e6994b9d2abbb801.zip
  2. Extract and run docker-compose up from the folder
  3. For first run, wait for the composer to finish download all dependencies
  4. Open a browser and enter http://localhost/pinpoint.php as the url
@kangks
kangks / Playground.hs
Created March 13, 2021 14:01
Plutus Playground Smart Contract
-- https://docs.cardano.org/projects/plutus/en/latest/tutorials/basic-validators.html#basic-validators-tutorial
-- https://edu.clio.one/lessons/writing-your-first-plutus-smart-contract/lessons/writing-your-first-plutus-code/
module SimpleValidator where
import Data.Text
-- import Language.Plutus.Contract
import Language.PlutusTx
--import qualified Language.PlutusTx as PlutusTx
import Playground.Contract
@kangks
kangks / gist:49aaf9c273ddefce68fba75ade80231a
Created October 5, 2020 00:47
AWS Lambda getting public IP address
import json
import urllib3
def lambda_handler(event, context):
return {
'statusCode': 200,
'body': get_public_ip()
}
def get_public_ip():
!pip install --upgrade mxnet-cu$(ls /usr/local/cuda/lib64/libcudart.so.*.? | sed -e 's/.*\.\([0-9]*\.[0-9]*\)/\$1/g' -e 's/\.//g')
@kangks
kangks / create_aws_iot_ota.py
Created June 29, 2020 03:47
Simple Python 3 script to create an AWS IoT OTA job
import sys, argparse
import boto3
import pathlib
from pathlib import Path
import random
parser = argparse.ArgumentParser(description='Script to start OTA update')
parser.add_argument("--aws_profile", help="Profile name created using aws configure", default="default", required=False)
parser.add_argument("--s3bucket", help="S3 bucket to store firmware updates", required=True)
parser.add_argument("--s3prefix", help="S3 bucket prefix to store firmware updates", required=False)
@kangks
kangks / persistent_client.py
Last active May 29, 2020 01:41
AWS IoT Persistent client test
from datetime import datetime
import time
import threading
import json
import logging
import paho.mqtt.client as mqtt
import paho.mqtt.publish as mqtt_publish
import boto3
subscriber_keepalive_sec = 40 * 60 # 40 mins
@kangks
kangks / python37_installation.ipynb
Created January 5, 2020 05:48
Python 3.7 installation Jupyter Notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.