- Mod + Shift + Enter -> Open console
- Mod + Space -> Change tiling mode
- Mod + j & Mod + k -> Move focus between windows
- Mod + Shift + c -> Close the focused window
- Mod + . & Mod + , -> Control the number of windows displayed in the master pane on the left
- Mod + Enter -> Move the focused window to the master pane on the left
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
#!/usr/bin/env ruby | |
# Convert the entries from a CSV with headers | |
# - post_title | |
# - post_date (must include year-month-day) | |
# - post_content | |
# into markdown posts with Liquid's front matter and the correct naming | |
# structure. Reminder that valid HTML posts are also valid markdown. | |
require "csv" |
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
# Parse a SQL file exported from a WordPress site containing the posts backup, | |
# generally named `wphf_posts.sql`, and create a file `wphf_posts.sql.csv` | |
# containing the data in CSV format. | |
# | |
# I could've used a proper sql parser but was in the mood to write some shitty code lol | |
require 'csv' | |
WP_POSTS_SQL_FILE = ARGV[0] | |
WP_POSTS_CSV_FILE = WP_POSTS_SQL_FILE + ".csv" |
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
require 'fileutils' | |
require 'nokogiri' | |
require 'open-uri' | |
require 'pp' | |
require 'typhoeus' | |
SUBJECTS_RE = /deep|deeply|neural|convolutional|network|recurrent|lstm|object recognition|object classification|object detection|image classification/ | |
def paper_list_url(issue) | |
"https://papers.nips.cc/book/advances-in-neural-information-processing-systems-#{issue}-#{1987 + issue}" |
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
#!/usr/bin/zsh | |
gs -dSAFER -dBATCH \ | |
-dNOPAUSE -dNOCACHE -sDEVICE=pdfwrite \ | |
-sColorConversionStrategy=CMYK \ | |
-dProcessColorModel=/DeviceCMYK \ | |
-sOutputFile=$2 \ | |
$1 |
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
./faces/kawamura/kawamura_straight_happy_open_4.pgm | |
./faces/phoebe/phoebe_up_sad_open_4.pgm | |
./faces/saavik/saavik_left_sad_sunglasses_4.pgm | |
./faces/sz24/sz24_right_angry_open_4.pgm | |
./faces/tammo/tammo_left_angry_sunglasses_4.pgm | |
./faces/bpm/bpm_up_neutral_open_4.pgm | |
./faces/kawamura/kawamura_up_angry_open_4.pgm | |
./faces/choon/choon_right_happy_sunglasses_4.pgm | |
./faces/saavik/saavik_right_sad_sunglasses_4.pgm | |
./faces/ch4f/ch4f_straight_angry_open_4.pgm |
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
-- Some RNGs for getting to play with Lua. | |
-- | |
-- Carlos Agarie <carlos@onox.com.br> | |
-- | |
-- Public domain. | |
-- N(mean; std^2). | |
function gauss(mean, std) | |
if std <= 0.0 then error("standard deviation must be positive!") end |
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
# Create a method `has_<library>?` on Module that requires the library and | |
# return a boolean indicating if the library is available. | |
# | |
# @param library [String] The library name. | |
# @return [Boolean] Whether the library is available or not. | |
def create_has_library(library) #:nodoc: | |
define_singleton_method("has_#{library}?") do | |
cv = "@@#{library}" | |
unless class_variable_defined? cv | |
begin |
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
class Counter | |
def initialize | |
@counts = Hash.new 0 | |
end | |
def <<(key) | |
@counts[key] += 1 | |
end | |
end |
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
var N = 100, | |
a = 2.0, | |
b = 0.0, | |
c = 0.2; | |
var defaultScale = { mu: 0, sigma: 1 }, | |
enemScale = { mu: 500, sigma: 100 }; | |
// @return: The probability of hit at `theta`, or P(right | theta, a, b, c). | |
var prob = function (a, b, c, theta) { | |
return c + (1 - c) / (1 + Math.exp(- a * (theta - b))); |
NewerOlder