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 visimath.circles | |
(:import [java.awt.event KeyEvent]) | |
(:require [quil.core :as qc])) | |
(def state (atom {:sin 1 :cos 1})) | |
(defn deg->pos [radius deg cos-k sin-k] | |
(let [rads (qc/radians (* 1 deg)) | |
posx (* radius (Math/cos (* cos-k rads))) | |
posy (* radius (Math/sin (* sin-k rads)))] |
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 enlive-examples.process | |
(:require [clojure.string :as string] | |
[cheshire.core :as chesh] | |
[clojure.pprint :as pp])) | |
(def data (chesh/parse-string (slurp "codefest-2013-raw.json") true)) | |
;; Sex | |
(defn person->name [person] |
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 enlive-examples.core | |
(:require [clojure.string :as string] | |
[net.cgrand.enlive-html :as html] | |
[cheshire.core :as chesh])) | |
(def ^:dynamic *base-url* "http://2013.codefest.ru/members/") | |
(defn fetch-url [url] | |
(html/html-resource (java.net.URL. url))) |
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
// Python | |
def func(arg1, arg2): | |
count = size(arg1) + size(arg2) | |
print count | |
print arg1 | |
// C | |
int func(string arg1, string arg2) { | |
int count = arg1.size() + arg2.size(); | |
printf("%d", count); |
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 '[clojure.string :as cs]) | |
(def conf | |
"key1=val1 | |
key2 = val2 | |
key3 = \\ | |
val3 | |
key\\ | |
4=val4 | |
key5=\\ | |
val5 |
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
# C++ | |
Stage process(State state) { | |
return | |
stage4( | |
stage3( | |
stage2( | |
stage1( | |
stage)))); | |
} |