Skip to content

Instantly share code, notes, and snippets.

View josephcc's full-sized avatar
💭

Joseph Chang josephcc

💭
View GitHub Profile
# 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
# 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
# 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
!!! 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
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('-')
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>'
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
# 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 = ''
!!! 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
# 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