Skip to content

Instantly share code, notes, and snippets.

Ricky Han rickyhan

Block or report user

Report or block rickyhan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rickyhan
rickyhan / gen.py
Created Feb 17, 2018
transform regular python code into tensorflow
View gen.py
import astunparse, ast, astpretty
from ast import *
fname = "./raw_fizzbuzz.py"
with open(fname) as f:
txt = f.read()
class RewriteName(NodeTransformer):
def visit_BoolOp(self, node):
# print astpretty.pprint(node)
View keybase.md

Keybase proof

I hereby claim:

  • I am rickyhan on github.
  • I am rickylqhan (https://keybase.io/rickylqhan) on keybase.
  • I have a public key whose fingerprint is E31A 62C4 A2ED 2F38 87C6 A7E0 B424 62FF 7D30 52C1

To claim this, I am signing this object:

@rickyhan
rickyhan / Drawing.hs
Created Sep 29, 2017 — forked from chrisdone/Drawing.hs
Drawing language: first attempt
View Drawing.hs
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -Wall #-}
-- Set your font to a monospace font which makes this character the same as the line-height: │
--
-- Otherwise, you'll see an ugly gap between connected lines if the
-- line-height of the font is high.
--
-- Example fonts:
--
View poloniex_websocket_watcher.py
import asyncio
import json
import threading
import urllib
import urllib.request
from collections import OrderedDict
import websockets
GET_TICKERS_URL = 'https://poloniex.com/public?command=returnTicker'
@rickyhan
rickyhan / tf_beam_decoder.py
Created Jun 22, 2017 — forked from nikitakit/tf_beam_decoder.py
Tensorflow Beam Search
View tf_beam_decoder.py
"""
Beam decoder for tensorflow
Sample usage:
```
from tf_beam_decoder import beam_decoder
decoded_sparse, decoded_logprobs = beam_decoder(
cell=cell,
@rickyhan
rickyhan / build.gradle
Last active Mar 24, 2017
Setting up CAS server
View build.gradle
apply plugin: 'org.springframework.boot'
apply from: 'http://dl.bintray.com/scalding/generic/waroverlay.gradle'
apply from: 'https://raw.githubusercontent.com/apereo/cas/5.0.x/gradle/overrides.gradle'
bootRepackage {
enabled = false
}
springBoot {
mainClass = "org.springframework.boot.loader.WarLauncher"
View parallax.html
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script>
(function ($) {
var maxfps = 25,
delay = 1 / maxfps * 1000,
You can’t perform that action at this time.