Skip to content

Commit

Permalink
Add clojure task: get-links.
Browse files Browse the repository at this point in the history
  • Loading branch information
nbeloglazov committed Apr 5, 2013
1 parent 17294c6 commit c6c56a2
Show file tree
Hide file tree
Showing 18 changed files with 461 additions and 1 deletion.
7 changes: 7 additions & 0 deletions tasks/CLOJURE/get-links/00.in
@@ -0,0 +1,7 @@
[:html {}
[:head {}
[:title {} "clojure - Google Search"]]
[:body {}
[:h3 {:class "r"} [:a {:class "l", :href "http://clojure.org/"} [:em {} "Clojure"] " - home"]]
[:h3 {:class "r"} [:a {:class "l", :href "http://en.wikipedia.org/wiki/Clojure"} [:em {} "Clojure"] " - Wikipedia, the free encyclopedia"]]
[:h3 {:class "r"} [:a {:class "l vst", :href "http://clojuredocs.org/"} "ClojureDocs - Community-Powered " [:em {} "Clojure"] " Documentation and " [:b {} "..."]]]]]
3 changes: 3 additions & 0 deletions tasks/CLOJURE/get-links/00.out
@@ -0,0 +1,3 @@
http://clojure.org/
http://en.wikipedia.org/wiki/Clojure
http://clojuredocs.org/
1 change: 1 addition & 0 deletions tasks/CLOJURE/get-links/01.in

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions tasks/CLOJURE/get-links/01.out
@@ -0,0 +1,10 @@
http://clojure.org/
http://en.wikipedia.org/wiki/Clojure
http://clojuredocs.org/
https://github.com/weavejester/hiccup
https://github.com/functional-koans/clojure-koans
http://en.wikibooks.org/wiki/Clojure_Programming
http://tryclj.com/
http://www.reddit.com/r/Clojure/
http://www.joyofclojure.com/
https://twitter.com/search?q=%23clojure
1 change: 1 addition & 0 deletions tasks/CLOJURE/get-links/02.in

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions tasks/CLOJURE/get-links/02.out
@@ -0,0 +1,13 @@
http://www.habrahabr.ru/
http://habrahabr.ru/posts/collective/
http://habrahabr.ru/sandbox/
http://habrahabr.ru/hub/DIY/
http://habrahabr.ru/posts/top/daily/
http://habrahabr.ru/hubs/
http://habrahabr.ru/posts/
https://ru.wikipedia.org/wiki/%D0%A5%D0%B0%D0%B1%D1%80%D0%B0%D1%85%D0%B0%D0%B1%D1%80
http://vk.com/habr
http://www.facebook.com/habrahabr.ru
https://twitter.com/habr_new
http://lurkmore.to/%D0%A5%D0%B0%D0%B1%D1%80%D0%B0
http://www.asite-telecom.com/ru/habrhabr
1 change: 1 addition & 0 deletions tasks/CLOJURE/get-links/03.in

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions tasks/CLOJURE/get-links/03.out
@@ -0,0 +1,10 @@
http://en.wikipedia.org/wiki/Java_virtual_machine
http://java.com/en/download/index.jsp
http://docs.oracle.com/javase/specs/jvms/se7/html/
http://docs.oracle.com/javase/6/docs/technotes/guides/vm/
http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-jvm-419420.html
http://docs.oracle.com/javase/specs/jvms/se7/jvms7.pdf
http://www.webopedia.com/TERM/J/JVM.html
http://www.azulsystems.com/products/zing/virtual-machine
http://www.javabeat.net/2013/02/what-is-the-difference-between-jrejvm-and-jdk/
http://help.aol.com/article/download-and-install-the-latest-java-virtual-machine-in-internet-explorer/50871
1 change: 1 addition & 0 deletions tasks/CLOJURE/get-links/04.in

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions tasks/CLOJURE/get-links/04.out
@@ -0,0 +1,10 @@
https://github.com/taste-o-code
https://github.com/taste-o-code/taste-o-code-web
https://github.com/taste-o-code/taste-o-code-tester
http://taste-o-code.com/
http://taste-o-code.com/about
http://taste-o-code.com/users/sign_up
https://gemnasium.com/taste-o-code/taste-o-code-web
https://gemnasium.com/taste-o-code
http://prezi.com/wdlvu1ua1w48/taste-o-code/
http://comments.gmane.org/gmane.comp.lang.haskell.beginners/9748
95 changes: 95 additions & 0 deletions tasks/CLOJURE/get-links/1_clojure.html

Large diffs are not rendered by default.

92 changes: 92 additions & 0 deletions tasks/CLOJURE/get-links/2_habr.html

Large diffs are not rendered by default.

96 changes: 96 additions & 0 deletions tasks/CLOJURE/get-links/3_java-virtual-machine.html

Large diffs are not rendered by default.

92 changes: 92 additions & 0 deletions tasks/CLOJURE/get-links/4_taste-o-code.html

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions tasks/CLOJURE/get-links/README.md
@@ -0,0 +1,13 @@
# get-links

A Clojure library designed to ... well, that part is up to you.

## Usage

FIXME

## License

Copyright © 2013 FIXME

Distributed under the Eclipse Public License, the same as Clojure.
Empty file.
15 changes: 15 additions & 0 deletions tasks/CLOJURE/get-links/task.py
@@ -0,0 +1,15 @@
from languages.clojure import ClojureTask
import os

# Description
# Write a function 'get-links' that extracts all links from parsed google search results.

test_code = """
(let [content (read)
links (get-links content)]
(doseq [link links]
(println link)))
"""

task = ClojureTask()
task.postcode = [test_code]
2 changes: 1 addition & 1 deletion test.py
@@ -1,7 +1,7 @@
from executor import Executor

lang = 'CLOJURE'
task = 'string-interpolation'
task = 'get-links'
solution = open('solutions/' + lang + '/' + task + '.clj').read()
result = Executor(lang, task, solution, '/home/playground/1/').execute()

Expand Down

0 comments on commit c6c56a2

Please sign in to comment.