Skip to content

Instantly share code, notes, and snippets.

View junyi's full-sized avatar
👋

Hee Jun Yi junyi

👋
View GitHub Profile
@junyi
junyi / keybase.md
Created August 5, 2017 12:18
Keybase proof

Keybase proof

I hereby claim:

  • I am junyi on github.
  • I am junyihjy (https://keybase.io/junyihjy) on keybase.
  • I have a public key ASCUdC6axNcDEdk6XjjQwu-8Y7XqpoaRYNGdSnsFmS-LqQo

To claim this, I am signing this object:

<!-- ## Introduction -->
<!-- This is a sample template for a news article in AMP. It demonstrates the usage of AMP components which works well in news articles. Examples include social sharing, image galleries, personalized content, ads, and more. -->
<!-- -->
<!doctype html>
<html ⚡>
<head>
<meta charset="utf-8">
<script async src="https://cdn.ampproject.org/v0.js"></script>
<!-- ## Setup -->
@junyi
junyi / npuzzle.py
Last active March 28, 2016 02:22
Analytic solution for n puzzle (reminder to self to make the code more elegant!)
from Queue import PriorityQueue
from random import shuffle
import math
import curses
import time
class AnalyticBoard(object):
def __init__(self, rows, cols, blocks):
self.rows = rows
self.cols = cols
@junyi
junyi / movie-titles.rb
Created March 9, 2016 06:18 — forked from karmi/movie-titles.rb
Multiple analyzers and query fields in Elasticsearch for auto-completion
require 'tire'
# Tire.configure { logger STDERR, level: 'debug' }
Tire.index('movie-titles') do
delete
create \
settings: {
index: {
analysis: {
@junyi
junyi / DES.py
Last active March 15, 2016 15:17
DES implementation in Python 2
from bitstring import BitArray
# Initial Permutation (IP)
IP = \
[58,50,42,34,26,18,10,2,
60,52,44,36,28,20,12,4,
62,54,46,38,30,22,14,6,
64,56,48,40,32,24,16,8,
57,49,41,33,25,17,9,1,
59,51,43,35,27,19,11,3,