Test

Posts

Archvied pages

  • link archive/projects.md
  • link archive/research.md
  • link archive/blog.html

Docs

Presentation

Code

Liquid Tag Based

JavaScript

A ruby script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var sigmoidGate = function() {
  // helper function
  this.sig = function(x) { return 1 / (1 + Math.exp(-x)); };
};
sigmoidGate.prototype = {
  forward: function(u0) {
    this.u0 = u0;
    this.utop = new Unit(this.sig(this.u0.value), 0.0);
    return this.utop;
  },
  backward: function() {
    var s = this.sig(this.u0.value);
    this.u0.grad += (s * (1 - s)) * this.utop.grad;
  }
}

Bash

1
2
3
def print_hi(name)
  puts "Hi, #{name} A line."
end

Fenced Code Blocks

Javascript

Span

Inline code like this.

Block

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var sigmoidGate = function() {
  // helper function
  this.sig = function(x) { return 1 / (1 + Math.exp(-x)); };
};
sigmoidGate.prototype = {
  forward: function(u0) {
    this.u0 = u0;
    this.utop = new Unit(this.sig(this.u0.value), 0.0);
    return this.utop;
  },
  backward: function() {
    var s = this.sig(this.u0.value);
    this.u0.grad += (s * (1 - s)) * this.utop.grad;
  }
}

No line numbers:

1
2
3
4
var sigmoidGate = function() {
  // helper function
  this.sig = function(x) { return 1 / (1 + Math.exp(-x)); };
};

Image

Width = 50% (no caption)

Width = 100% (default & with caption)

width: 100%

Width = 80% (with caption)

width: 80%

Installing imagemin

1
2
3
4
5
sudo npm install --global imagemin-cli
sudo npm install --global imagemin-gifsicle --unsafe-perm=true --allow-root
sudo npm install --global imagemin-pngquant --unsafe-perm=true --allow-root
sudo npm install --global imagemin-jpegtran --unsafe-perm=true --allow-root
sudo npm install --global imagemin-optipng --unsafe-perm=true --allow-root

Running it on png files

1
2
3
4
5
6
7
# Original file size: 1.6 MB
# Resized file size: 501 KB
imagemin --plugin=pngquant youtube_issues.png >plugin.png

# Original file size: 1.6 MB
# Resized file size: 1.2 MB
imagemin youtube_issues.png >no_plugin.png