Skip to content

Instantly share code, notes, and snippets.

View shawntan's full-sized avatar

Shawn Tan shawntan

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shawntan
shawntan / index.html
Created June 1, 2023 01:28
reactjs d3 tree component
<div id="huffmandemo">
<textarea id="RawText">🍒🍊🍍🍑🍎🍌🍑🥝🍎🍎🍇🍊🍇🍌🍎🍎🍎🍊🍎🍉🍎🍉🍎🍑🍌🍇🍍🍊🍎🍊🍎🍇🍎🍌🍓🍓🍎🍊🍓🍉🍍🍓🍎🍎🍌🍌🍎🍇🍌🍎🍉🍉🍌🍊🍇🍍🍎🍓🍌🥝🍊🍇🍌🍊🍌🍎🍎🍊🍍🍎🍇🍊🍌🍒🍇🍌🍎🍎🍎🍎🍊🍌🍌🍌🍇🍎🍑🍎🍑🍊🍌🍊🍎🍌🍌🍒🍎🍌🍎🍊</textarea>
<div id="TreeChart"></div>
<button id="reset">reset tree</button>
<button id="step">Step</button>
<button id="stepAll">Build Tree</button>
<pre>
<code id="codebook" class="language-python" data-lang="python">
</code>
</pre>
@shawntan
shawntan / index.html
Created April 18, 2023 00:27
reactjs d3 tree component
<div id="react-app"></div>
@shawntan
shawntan / index.html
Created April 17, 2023 18:54
reactjs d3 tree component
<div id="react-app"></div>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# /etc/bash/bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output. So make sure this doesn't display
# anything or bad things will happen !
# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
defscrollback 5000
altscreen on
autodetach on
caption always " | %-w%{= BW}%40L>%n %t%{-}%+w |%<"
hardstatus alwayslastline
# Turn off that annoying start up message
startup_message off
# Turn the even more annoying whole-screen-flash-on-tab-complete "feature"
vbell off
# Window list at the bottom. hostname, centered tabs and redmarked active windows:
# /etc/bash/bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output. So make sure this doesn't display
# anything or bad things will happen !
# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
@shawntan
shawntan / parity.ipynb
Created March 30, 2022 02:28
Parity problem with PFSA
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.