This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/")) | |
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/")) | |
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t) ; Org-mode's repository | |
(defun ensure-package-installed (&rest packages) | |
"Assure every package is installed, ask for installation if it’s not. | |
Return a list of installed packages or nil for every skipped package." | |
(mapcar | |
(lambda (package) | |
;; (package-installed-p 'evil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;(:require [org.httpkit.client :as httpkit]) | |
;;(:require [clojure.java.io :as io]) | |
;;(:require [net.cgrand.enlive-html :as html]) | |
(defn get-raw-translation-result [src-text ] | |
(apply (comp first :content ) (html/select (html/html-snippet | |
(:body (http/post "http://tilmach.net" | |
{:form-params {:Source src-text}}))) [:textarea#Target]))) | |
(defn translate [src] | |
(.trim (get-raw-translation-result src))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns learn.core | |
(:require [clojure.core.async :refer [chan sliding-buffer go go-loop | |
timeout >! <!]]) | |
(:require [clojure.core.reducers :as r]) | |
(:require [clj-http.client :as http]) | |
(:require [org.httpkit.client :as httpkit]) | |
(:require [clojure.java.io :as io]) | |
(:require [net.cgrand.enlive-html :as html]) | |
(:use [clojure.java.shell :only [sh]]) | |
(:require [clojure.string :as str]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns learn.ui | |
(:require [seesaw.core :as ui]) | |
(:use seesaw.font) | |
(:require [clj-http.client :as http]) | |
) | |
(def my-frame (ui/frame :title "awesome")) | |
(-> my-frame ui/pack! ui/show!) |
NewerOlder