Skip to content

Instantly share code, notes, and snippets.

@eldilibra
eldilibra / fetchDebuggingSetup.scpt
Created November 19, 2012 20:03
Set up iTerm for debugging Fetch
#!/usr/bin/osascript
tell app "iTerm"
activate
-- make a new terminal
set myterm to (make new terminal)
-- talk to the new terminal

Hello all. We must choose an extraction library for our new Goliath system to provide default values when no rules have been set. The choice has been narrowed down to Boilerpipe and Goose. They both have sub-par documenation (Boilerpipe, Goose), so I've dug around in the code to find the exact process by which they pull out data. Here I will compare them so we can choose one.

#Boilerpipe

This bad mamba jamba was developed by a Ph.D-having guy who, along with some other folks, wrote a big fat academic paper around the algorithm it uses, which you can find in our Dropbox if you really want to read it. Basically, they use link density, text density, and number of words on a block-by-block basis to distinguish boilerplate blocks from content blocks. A block is simply a contiguous piece of text terminated by the start

function quickSortNums (items) {
var sorted = [];
if (!(items instanceof Array)) {
throw new Error('The parameter must be an array.');
}
if (items.length < 2) {
return items;
}
var pivot = items[Math.floor(items.length / 2)];
sorted.push.apply(sorted, quickSortNums(filter(items, '_ < pivot', { pivot: pivot })));
"
" vimrc like a boss
" <[email protected]>
" modified by
" <[email protected]>
"
" all mouse functionality
" set mouse=a
"
" vimrc like a boss
" <[email protected]>
" modified by
" <[email protected]>
"
" all mouse functionality
" set mouse=a
{
"strengths": ["STRENGTH", "STRENGTH", "STRENGTH", "STRENGTH"],
"passions": ["PASSION", "PASSION", "PASSION", "PASSION"],
"awarenesses": ["AWARENESS", "AWARENESS", "AWARENESS", "AWARENESS"]
}
#!/bin/sh
git branch | while read line
do
if [[ "$line" == \** ]];
then
echo "${line:2}"
fi
done
function iterativeTreeTraversal (rootNode) {
var visited = [rootNode]; //arrays act like stacks in js if you only use push and pop
var currentNode;
while (visited.length) {
currentNode = visited.pop();
currentNode.children.forEach(function (child) {
visited.push(child);
});
}
}
function Node (id, depth) {
this.id = id;
this.depth = depth;
this.children = [];
this.equals = function equals (otherNode) {
return this.id === otherNode.id;
};
}
function shortestPath (root, dest) {
function Node (id) {
this.id = id;
this.friends = [];
this.equals = function equals (otherNode) {
return this.id === otherNode.id;
};
}
function shortestPath (root, dest) {
var current = root;