Skip to content

Instantly share code, notes, and snippets.

import sys
class Balance(object):
def __init__(self, ident):
# Balance identifer
self.ident = ident
# Left/right hand weights
self.wl = 0
@c2nes
c2nes / emacs.el
Created May 2, 2012 23:05
.emacs
;; .emacs
;; Kill those stupid startup messages
(setq inhibit-startup-message t)
;; Disable menubar, toolbar, and scrollbars
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
[cmthunes@bc1b3 wikisearch]$ ./wikisearch rpn arithmetic addition enter hp
Select done.
Categorize done.
Articles:
0.0099 HP-10
0.0093 Elementary operations
0.0076 List of WebOS devices
0.0072 HP BASIC
0.0066 HP Deskjet F300 all-in-one series
@c2nes
c2nes / VerifyLinksJob.java
Created April 18, 2012 21:26
5 Clicks to Jesus demo
package edu.ncsu.sdc.wikisearch.jobs;
import java.io.*;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.*;
import org.apache.hadoop.mapreduce.*;
import edu.ncsu.sdc.wikisearch.tables.*;
@c2nes
c2nes / dumpjson.py
Created February 23, 2012 01:05
Convert Wikipedia XML dump to JSON
#!/usr/bin/env python
import os
import sys
SOURCE_FILE = "/home/cmthunes/enwiki-20120211-pages-meta-current.xml"
OUTPUT_FILE = "/mnt/reports/cmthunes/enwiki-20120211.json"
def extract_with_delims(s, start_delim, end_delim):
start_index = s.find(start_delim)
@c2nes
c2nes / sources.conf
Created November 11, 2011 16:19
SVR Sources Configuration
# Test source
cam0 = cam:
cam1 = file:path=/home/christopher/downloads/bright_bottom_spots2.avi
test = test:
#test = test:width=640,height=480,rate=50