An interactive longitudinal heatmap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We first start by creating a way of escaping the characters that have special | |
# meaning for html, while making sure we don't end up double-escaping at any | |
# point. The easiest way to do this is to create an S3 class that allows us to | |
# distinguish between regular text (that needs escaping) and html (that | |
# doesn't). | |
# | |
# We then write an escape method that leaves html unchanged and escapes the | |
# special characters (&, <, >) in ordinary text. We also add a method for lists | |
# for convenience |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<script src="http://mbostock.github.com/d3/d3.v2.js?2.8.1"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<style> | |
body { | |
font: 10px sans-serif; | |
} | |
rect { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Sets the colors used within the text area | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
// Note that the font_face and font_size are overriden in the platform | |
// specific settings file, for example, "Base File (Linux).sublime-settings". | |
// Because of this, setting them here will have no effect: you must set them | |
// in your User File Preferences. | |
"font_face": "Monaco", | |
"font_size": 12, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A Ruby implementation of | |
# the Viterbi algorithm based on the hidden Markov model (HMM) | |
# | |
# An original Python code: a Wikipedia page "Viterbi algorithm" at | |
# http://en.wikipedia.org/wiki/Viterbi_algorithm | |
# | |
# Author: MISHIMA, Hiroyuki | |
# | |
require 'pp' |