This file contains hidden or 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
| # C-b to C-a | |
| unbind C-b | |
| set-option -g prefix C-a | |
| set-option -g default-shell /bin/zsh | |
| # C-a a send raw C-a | |
| bind a send-prefix | |
| # Alert on window notification | |
| setw -g monitor-activity on |
This file contains hidden or 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
| # SQLite version 3.x | |
| # gem install sqlite3 | |
| # | |
| # Ensure the SQLite 3 gem is defined in your Gemfile | |
| # gem 'sqlite3' | |
| development: | |
| adapter: mysql2 | |
| database: ka_development | |
| pool: 5 | |
| timeout: 5000 |
This file contains hidden or 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
| # Place all the behaviors and hooks related to the matching controller here. | |
| # All this logic will automatically be available in application.js. | |
| # You can use CoffeeScript in this file: http://coffeescript.org/ | |
| # | |
| # | |
| current_stage = 1 | |
| clips = null | |
| id2idx = null |
This file contains hidden or 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
| !!! 5 | |
| %html | |
| %head | |
| %title Option Manager - Phase 2 | |
| %meta{name:"viewport", content:"width=device-width, initial-scale=1.0"} | |
| -#%link{href:"/find_clips/stylesheets/clipper.css", rel:"stylesheet"} | |
| = javascript_include_tag "application" | |
| = stylesheet_link_tag "application" | |
| :javascript |
This file contains hidden or 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
| turker = Turker.find_by :creator_id => feedback.user_id | |
| nickname = 'LOCAL' | |
| if not turker.nil? | |
| nickname = OrganicHash.hash(turker.turker_id, true).map{|s| s.capitalize}.join('-') |
This file contains hidden or 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
| import string | |
| import operator | |
| Y = lambda x: (2*x) + 1 | |
| N = lambda x: (2*x) + 2 | |
| train_file = 'hw6-WSJ-1.tags' | |
| test_file = 'hw6-WSJ-2.tags' | |
| SS = '<S>' |
This file contains hidden or 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
| from operator import * | |
| from itertools import * | |
| from collections import Counter | |
| from math import log | |
| from lib import * | |
| from copy import copy | |
| MAX_NODES = 64 -1 | |
| TREE = [None] * MAX_NODES | |
| PDFS = [None] * MAX_NODES |
This file contains hidden or 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
| # Place all the behaviors and hooks related to the matching controller here. | |
| # All this logic will automatically be available in application.js. | |
| # You can use CoffeeScript in this file: http://coffeescript.org/ | |
| # | |
| clips = null | |
| id2idx = null | |
| textToHtml = (text, keywords) -> | |
| out = '' |
This file contains hidden or 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
| !!! 5 | |
| %html | |
| %head | |
| %title Option Manager | |
| %meta{name:"viewport", content:"width=device-width, initial-scale=1.0"} | |
| -#%link{href:"/find_clips/stylesheets/clipper.css", rel:"stylesheet"} | |
| = javascript_include_tag "application" | |
| = stylesheet_link_tag "application" | |
| :javascript |
This file contains hidden or 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 document. | |
| class TfIdfSimilarity::Document | |
| # The document's identifier. | |
| attr_reader :id | |
| # The document's text. | |
| attr_reader :text | |
| # The number of times each term appears in the document. | |
| attr_reader :term_counts | |
| # The number of tokens in the document. | |
| attr_reader :size |