Skip to content

Instantly share code, notes, and snippets.

View shriphani's full-sized avatar

Shriphani Palakodety shriphani

View GitHub Profile
#lang racket/base
(require ffi/unsafe
ffi/unsafe/define)
(require racket/stream)
;;;; Test if we can build/search from whistlepig
;; reference the whistlepig shared object
(define-ffi-definer define-whistlepig (ffi-lib "libwhistlepig"))
#lang racket
(require racket/file)
(require srfi/13) ; string search methods
(require srfi/14) ; charset library
(require "racket-whistlepig.rkt")
;; Create a new index in /tmp (so this is very much unix only)
;; and add all the racket source files in it
(define (add-files index-prefix files)
#lang racket
(require racket/cmdline)
(require "racket-whistlepig.rkt")
(define (test-index-load)
(wp-index-load "/tmp/index"))
(define (query index q num-res)
(define query (wp-query-parse q "body"))
gcc --shared -o libwhistlepig.so entry.o file-indexer.o index.o lock.o query-parser.o query-parser.lex.o query-parser.tab.o query.o search.o segment.o snippeter.o stringmap.o stringpool.o termhash.o tokenizer.lex.o mmap-obj.o error.o
((1 "/Users/shriphani/Documents/blog/2013/07/13/new-blog/index.html" "New Blog" "http://blog.shriphani.com/2013/07/13/new-blog/")
(2 "/Users/shriphani/Documents/blog/2013/07/13/fast-dates-parser/index.html" "Fast Dates Parser" "http://blog.shriphani.com/2013/07/13/fast-dates-parser/")
(3 "/Users/shriphani/Documents/blog/2013/07/21/accessing-your-kindle-highlights/index.html" "Accessing Your Kindle Highlights" "http://blog.shriphani.com/2013/07/21/accessing-your-kindle-highlights/")
(4 "/Users/shriphani/Documents/blog/2013/07/21/pittsburgh-vintage-grand-prix-italian-cars/index.html" "Pittsburgh Vintage Grand Prix - Italian Cars" "http://blog.shriphani.com/2013/07/21/pittsburgh-vintage-grand-prix-italian-cars")
(5 "/Users/shriphani/Documents/blog/2013/07/22/the-percolator-paper/index.html" "The Percolator Paper" "http://blog.shriphani.com/2013/07/24/the-percolator-paper/")
(6 "/Users/shriphani/Documents/blog/2013/08/16/clueweb12-status-report/index.html" "Clueweb12++ Status Report" "http://blog.shriphani.c
#lang racket
(require racket/cmdline
rackjure
net/url
web-server/http
web-server/servlet
web-server/servlet-env)
(require "racket-whistlepig.rkt")
Welcome to Racket v5.3.6.
racket@> ,enter "/Users/shriphani/Documents/Fall2013Personal/zephyros.rkt"
link: bad variable linkage;
reference to a variable that is uninitialized
reference phase level: 0
variable module: "/Applications/Racket/collects/planet/private/resolver.rkt"
variable phase: 0
reference in module: "/Applications/Racket/collects/scribble/tag.rkt"
in: get-planet-module-path/pkg
errortrace...:
;;;; Soli Deo Gloria
;;;; Author: [email protected]
;;;; ZephyrOS client in Racket
#lang racket
(require racket/place)
(require (planet shawnpresser/racket-unix-sockets:1:0))
(define zephyros-in-ch (place
@shriphani
shriphani / fib
Created September 15, 2013 21:31
#lang racket
(require racket/place)
(define (fib n)
1)
(define (start-fib n)
(define p
(place ch
1.
Website: https://discussions.apple.com/community/ilife/imovie?view=discussions
Xpath to records:
"//html/body[contains(@class,'jive')]/div[contains(@id,'jive') and contains(@class,'clearfix')]/div[contains(@id,'container')]/div[contains(@id,'main')]/div[contains(@class,'content')]/div[contains(@id,'jive')]/div[contains(@id,'jive')]/div[contains(@id,'jive')]/div[contains(@id,'jive')]/div[contains(@id,'jive')]/div[contains(@class,'jive')]/div[contains(@class,'jive')]/div[contains(@id,'jive') and contains(@class,'jive')]/div[contains(@id,'jive')]/div[contains(@class,'jive')]/table/tbody/tr"
Xpath to enumeration: "//html/body[contains(@class,'jive')]/div[contains(@id,'jive') and contains(@class,'clearfix')]/div[contains(@id,'container')]/div[contains(@id,'main')]/div[contains(@class,'content')]/div[contains(@id,'jive')]/div[contains(@id,'jive')]/div[contains(@id,'jive')]/div[contains(@id,'jive')]/div[contains(@id,'jive')]/div[contains(@class,'jive')]/div[contains(@class,'jive')]/div[contains(@id,'jive') and c