I hereby claim:
- I am sids on github.
- I am sids (https://keybase.io/sids) on keybase.
- I have a public key whose fingerprint is 940D 5E1F 153F 8DAB 36CA 0727 DFF8 A272 1E00 FA78
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
;;; This is taken from http://paste.lisp.org/display/97057 | |
;;; (which is no more; thanks to Wayback Machine which let me retrieve this). | |
;;; http://clojure.googlegroups.com/web/tutorial.pdf | |
;;; Vector binding forms destructure sequential things (vectors, | |
;;; lists, seqs, strings, arrays, and anything that supports nth) | |
;;; Map binding forms destructure associative things (maps, vectors, strings and arrays; | |
;;; the latter three have integer keys) |
(ns prime-summands.core | |
(:use [clojure.contrib.lazy-seqs :only #{primes}])) | |
(defn prime-summands [n] | |
(let [primes (take-while #(<= % n) primes)] | |
(reduce + | |
(for [start (range (count primes))] | |
(let [primes-sums (->> primes | |
(drop start) | |
(reductions +) |
(ns prime-summands.core | |
(:use [clojure.contrib.lazy-seqs :only #{primes}])) | |
(defn prime-summands [n] | |
(let [primes (take-while #(<= % n) primes)] | |
(reduce + | |
(for [start (range (count primes)) | |
end (range 1 (inc (count primes)))] | |
(let [primes (drop start (take end primes))] | |
(if (= n (reduce + primes)) |
#!/bin/sh | |
# Regenerate ctags on checkout | |
# project/.git/hooks/post-checkout | |
DIR=$GIT_DIR | |
if [ 0 -eq $3 ]; then | |
# file checkout | |
else | |
# tree checkout |
# Redis configuration file example | |
# Note on units: when memory size is needed, it is possible to specifiy | |
# it in the usual form of 1k 5GB 4M and so forth: | |
# | |
# 1k => 1000 bytes | |
# 1kb => 1024 bytes | |
# 1m => 1000000 bytes | |
# 1mb => 1024*1024 bytes | |
# 1g => 1000000000 bytes |
http://search1.flipkart.com/solr/select?spellcheck=true&q=resumen+los+anticonceptivos+explicados+a+los+jovenes&spellcheck.q=resumen+los+anticonceptivos+explicados+a+los+jovenes&spellcheck.count=6&qt=spell_not&spellcheck.collate=true&debugQuery=true&indent=on&echoParams=true |
;; First fetch CVS version of slime, git version of clojure, swank-clojure, clojure-contrib and clojure-mode | |
;; Create ~/bin/clojure script which starts clojure repl and adds clojure-contrib src dir and swank-clojure src dir to classpath. I used clj-env helper from clojure-contrib | |
(pushnew '("\.clj$" . clojure-mode) auto-mode-alist) | |
(require 'clojure-mode) | |
;;;; Slime configuration stuff | |
(setf slime-lisp-implementations | |
'((ecl("~/bin/ecl" "--heap-size" "1024000000") :coding-system utf-8-unix) |
;;; all code in this function lifted from the clojure-mode function | |
;;; from clojure-mode.el | |
(defcustom sids/clojure-mode-font-lock-comment-sexp nil | |
"Set to non-nil in order to enable font-lock of (comment...) | |
forms. This option is experimental. Changing this will require a | |
restart (ie. M-x clojure-mode) of existing clojure mode buffers." | |
:type 'boolean) | |
(defconst sids/clojure-font-lock-keywords |
(ns in.grok.history.html-parser | |
(:require [clojure.contrib.logging :as log]) | |
(:import [org.htmlcleaner HtmlCleaner] | |
[org.apache.commons.lang StringEscapeUtils])) | |
(defn parse-page | |
"Given the HTML source of a web page, parses it and returns the :title | |
and the tag-stripped :content of the page. Does not do any encoding | |
detection, it is expected that this has already been done." | |
[page-src] |