Skip to content

Instantly share code, notes, and snippets.

View 0b01's full-sized avatar

Ricky Han 0b01

View GitHub Profile
@0b01
0b01 / parallax.html
Created March 6, 2017 03:48
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,
@0b01
0b01 / build.gradle
Last active March 24, 2017 22:24
Setting up CAS server
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"
@0b01
0b01 / tf_beam_decoder.py
Created June 22, 2017 06:04 — forked from nikitakit/tf_beam_decoder.py
Tensorflow Beam Search
"""
Beam decoder for tensorflow
Sample usage:
```
from tf_beam_decoder import beam_decoder
decoded_sparse, decoded_logprobs = beam_decoder(
cell=cell,
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'
@0b01
0b01 / Drawing.hs
Created September 29, 2017 07:10 — forked from chrisdone/Drawing.hs
Drawing language: first attempt
{-# 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:
--
@0b01
0b01 / keybase.md
Created December 24, 2017 04:56
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:

@0b01
0b01 / gen.py
Created February 17, 2018 05:21
transform regular python code into tensorflow
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)

Keybase proof

I hereby claim:

  • I am 0b01 on github.
  • I am 0b01 (https://keybase.io/0b01) on keybase.
  • I have a public key ASBOSb5rG-iJvINhxUJRiu1KdVnE8pSexK2rKu-Zx4JaIwo

To claim this, I am signing this object:

//! Algorithm for arranging notes on bass
//! takes in a csv of notes with header
//! and outputs csv of fretboard positions with header
extern crate csv;
use std::collections::HashMap;
const MIDI_A4: f32 = 69.;
const FREQ_A4: f32 = 440.;