Skip to content

Instantly share code, notes, and snippets.

View tonghuikang's full-sized avatar
:octocat:
:/

Tong Hui Kang tonghuikang

:octocat:
:/
  • Singapore University of Technology and Design
  • Singapore
  • LinkedIn in/huikang-tong
View GitHub Profile
@tonghuikang
tonghuikang / hashcode_qualifier_distribution.ipynb
Last active May 22, 2022 16:51
Hash Code score distribution
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tonghuikang
tonghuikang / multiprocessing.ipynb
Created January 16, 2021 11:44
Multiprocessing Example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tonghuikang
tonghuikang / hw4-gridworld.ipynb
Last active April 19, 2020 19:26
SML HW4 template
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tonghuikang
tonghuikang / .gitignore
Created March 30, 2020 17:15
.gitignore
.DS_Store
.ipynb_checkpoints/
*/.ipynb_checkpoints/
*.pyc
@tonghuikang
tonghuikang / hw3_template.ipynb
Created March 25, 2020 04:47
SML homework template Q3
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tonghuikang
tonghuikang / huikang_ef_code.ipynb
Created February 20, 2020 21:39
Exercise Moonlight best algorithm for part e and f.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tonghuikang
tonghuikang / calendar.md
Created September 25, 2019 10:27
How to (auto-manually) update Google Calendar entries with Google Spreadsheets
@tonghuikang
tonghuikang / calc-hard.ipynb
Created September 21, 2019 14:14
fbhack 2019
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tonghuikang
tonghuikang / asyncReadWriteFile.js
Created August 27, 2019 03:19
Nodejs asynchronous read and write file
var parser = require("azure-func-multipart-parser");
var localImports = require("../modules/local-imports.js")
const FormData = require("form-data");
const fs = require('fs')
const { promisify } = require('util')
const readFileAsync = promisify(fs.readFile)
const writeFileAsync = promisify(fs.writeFile)
const run = async () => {
await writeFileAsync("/tmp/test/data.json", Buffer.from('Hello Node.js'));
@tonghuikang
tonghuikang / encrypt_decrypt_asym.js
Created August 1, 2019 08:52
Nodejs encrypt decrypt keygen asymmetric
const crypto = require('crypto')
const path = require('path')
const fs = require('fs')
const { writeFileSync } = require('fs')
const { generateKeyPairSync } = require('crypto')
function generateKeys() {
const { privateKey, publicKey } = generateKeyPairSync('rsa', {