Skip to content

Instantly share code, notes, and snippets.

View korakot's full-sized avatar

Korakot Chaovavanich korakot

  • Bangkok, Thailand
View GitHub Profile
@korakot
korakot / addpath.m
Last active June 22, 2016 03:16
Add octave search path #m
% octave will search m-file here too
addpath('C:\Users\ang\Desktop')
@korakot
korakot / hello.py
Last active June 22, 2016 03:15
Yet another hello world. #python
print("Hello World")
@korakot
korakot / basic.R
Created June 22, 2016 03:25
Basic R #R
a <- 10
b <- 32
a+b
@korakot
korakot / hyphen
Last active June 22, 2016 03:37
soft hyphen #unicode
soft hyphen (ISO 8859: 0xAD, Unicode U+00AD SOFT HYPHEN, HTML: &#173; &shy;)
or syllable hyphen (EBCDIC: 0xCA), abbreviated SHY,
is a code point reserved in some coded character sets for the purpose of
breaking words across lines by inserting visible hyphens.
@korakot
korakot / vector.R
Created June 22, 2016 04:41
Vector in R #R
remain <- c(11,12,11,13)
# name the elements
suits <- c("spades", "hearts", "diamonds", "clubs")
names(remain) <- suits
# shortcut
remain <- c(spades=11, hearts=12, diamonds=11, clubs=13)
str(remain) # see detail
@korakot
korakot / 59-06-22
Last active June 22, 2016 05:10
Gist and Gisto #chat #gist
11:51 AM
วันนี้​ ที่​ achieve หลัก​ คือ​ได้​ tool จด​ knowledge แล้ว
ใช้​ gist + gisto
gist.github.com/korakot
gisto app มี​บน​ทั้ง​ mac/win
สำคัญ​คือ​เรื่อง​ #tag ให้​ค้นหา​ง่าย
ถ้า​เล่น​บน​ ipad ก็​ใช้​ web interface ไป
ข้อ​เจ๋ง​ คือ backend เป็น​ git จึง​มี​ track history และ​ compare versions ได้​
เรื่อง​ tool เก็บ knowledge เป็น​เรื่อง​ใหญ่​มาก​ของ​พี่​ เพราะ​เป็น​ foundation ของ​เรื่อง​อื่น​ทุก​เรื่อง​
@korakot
korakot / .profile
Created July 8, 2016 02:49
.profile (no .bashrc on mac) #bash #alias
alias ll="ls -l"
@korakot
korakot / projector.md
Last active December 29, 2023 13:15
Load data to Embedding Projector

Tensorboard Embedding Projector can load external data from gist.

Call them with your own config like this http://projector.tensorflow.org/?config=https://gist.githubusercontent.com/korakot/c480edd1fcf7e02c49ccddbf5ac43fb9/raw/21bcc93899e0a3db334e4d04b7f6ef7d6c2b09c8/config.json

  • tensorPath: numerical data without column name, in bytes or tsv format
  • metadataPath: labels or field columns. If it's just 1 column, assume it to be label and don't need the first line.

More details from announcment, how-to,

@korakot
korakot / 2vec.md
Last active November 22, 2021 04:44
Thai Word Embedding (word2vec) result, trained on Best Corpus (novel genre)
@korakot
korakot / LK82.py
Last active April 13, 2020 04:16
Thai Soundex LK82, Udom83
# ตาม guru.sanook.com/1520
import re
t1 = str.maketrans("กขฃคฅฆงจฉชฌซศษสญยฎดฏตณนฐฑฒถทธบปผพภฝฟมรลฬฤฦวหฮอ",
"กกกกกกงจชชชซซซซยยดดตตนนททททททบปพพพฟฟมรรรรรวหหอ")
t2 = str.maketrans(
"กขฃคฅฆงจฉชซฌฎฏฐฑฒดตถทธศษสญณนรลฬฤฦบปพฟภผฝมำยวไใหฮาๅึืเแโุูอ",
"1111112333333333333333333444444445555555667777889AAABCDEEF")
def LK82(s):
res = []