(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
""" | |
Viterbi algorithm for finding the most likely state sequence of a simple | |
hidden markov model. | |
# https://en.wikipedia.org/wiki/Viterbi_algorithm | |
The Model | |
--------- | |
The HMMs considered in this code are extremely simple. Every hidden state | |
is uniquely associated with an output symbol, but the link is "fuzzy". That is, |
# -*- coding: utf-8 -*- | |
""" | |
This is an example of a basic optical character recognition system. | |
Some components, such as the featurizer, are missing, and have been replaced | |
with data that I made up. | |
This system recognizes words produced from an alphabet of 2 letters: 'l' and 'o'. | |
Words that can be recognized include, 'lol', 'lolol', 'and loooooll'. | |
We'll assume that this system is used to digitize hand-written notes by Redditors, | |
or something. |
//Primitive Type Comparison | |
var a = 1; | |
var b = 1; | |
var c = a; | |
console.log(a == b); //true | |
console.log(a === b); //true | |
console.log(a == c); //true | |
console.log(a === c); //true |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This guide assumes you have the emmet
and language-babel
packages already installed in Atom
keymap.cson
file by clicking on Atom -> Keymap…
in the menu bar'atom-text-editor[data-grammar~="jsx"]:not([mini])':
import React, { Component, PropTypes, createElement } from 'react' | |
import { findDOMNode } from 'react-dom' | |
// usage: | |
// import { ScrollSpy, Link } = './wherever-this-file-is' | |
// | |
// <ScrollSpy> | |
// <Link ref={c => this._firstLink = c} section="1">Section 1</Link> | |
// <Link section="2">Section 2</Link> | |
// <Link section="3">Section 3</Link> |
// in __mocks__/ | |
// Jest file stub | |
module.exports = "test-file-stub"; |