Skip to content

Instantly share code, notes, and snippets.

View khacanh's full-sized avatar
😀

khacanh khacanh

😀
  • Ho Chi Minh city
View GitHub Profile
@khacanh
khacanh / normcore-llm.md
Created August 29, 2023 01:33 — forked from veekaybee/normcore-llm.md
Normcore LLM Reads

App description

Create a simple ReactJS app that fetches and displays a list of Rails GitHub issues. For each item display the id and the title. Use ul and li for this list.

GitHub API supports pagination, at the beginning load the first page with 5 issues. At the bottom there is a button Next that loads the next 5 issues.

Clicking on an issue item will highlight it. Click on it again will toggle the highlight. Only 1 item is highlighted at a time.

Feel free to implement the UI in your own way. However the code should be neat.

@khacanh
khacanh / mdn.py
Last active February 11, 2019 23:20
Mixture density network with Tensorflow
# From http://blog.otoro.net/2015/11/24/mixture-density-networks-with-tensorflow/
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
import math
NHIDDEN = 24
STDEV = 0.5
KMIX = 24 # number of mixtures
@khacanh
khacanh / kieu.txt
Last active March 13, 2017 15:56
Kieu
Trăm năm trong cõi người ta,
Chữ tài chữ mệnh khéo là ghét nhau.
Trải qua một cuộc bể dâu,
Những điều trông thấy mà đau đớn lòng.
Lạ gì bỉ sắc tư phong,
Trời xanh quen thói má hồng đánh ghen.
Cảo thơm lần giỞ trước đèn,
Phong tình có lục còn truyền sử xanh.
Rằng năm Gia Tĩnh triều Minh,
Bốn phương phẳng lặng, hai kinh vững vàng.
@khacanh
khacanh / init.vim
Created December 14, 2016 09:39
Vim dot file
"========================================================
" INSTALL PLUGINS
"========================================================
filetype off
call plug#begin('~/.vim/plugged')
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'scrooloose/nerdtree'
Plug 'scrooloose/nerdcommenter'
Plug 'easymotion/vim-easymotion'
@khacanh
khacanh / vietnamese.rules
Created October 15, 2016 14:43 — forked from linhmtran168/vietnamese.rules
Vietnamese unaccent rules
À A
Á A
Ả A
Ạ A
 A
Ấ A
Ầ A
Ẩ A
Ậ A
Ẫ A
@khacanh
khacanh / vim+cli.md
Last active February 15, 2017 05:12
Vim and cli stuff

[1] Search and replace in multiple files

:argadd **/*.rb
:arg # list out arguments
:argdo %s/\(pattern\)/\1_asdf/ge | update

[2] Find magic

find . -name '*.rb' -newer Gemfile -print
adb -s emulator-55 shell
su -
cp /data/data/com.app.yo/databases/mydb.db /sdcard/Download/
# exit adb shell
adb pull /sdcard/Download/mydb.db
@khacanh
khacanh / queries.js
Last active August 29, 2015 14:15
Queries
// script1.js
// This is our test script
// This simple script will bump the lock to 100%
var Firebase = require('firebase');
var firebase = new Firebase('<FIREBASEROOT>/mychat/presences');
var token = '<FIREBASE_SECRET>';
function cleanup(code) {
console.log("EXIT");