wget https://swift.org/builds/swift-4.0-release/ubuntu1604/swift-4.0-RELEASE/swift-4.0-RELEASE-ubuntu16.04.tar.gz
tar xvzf swift-4.0-RELEASE-ubuntu16.04.tar.gz
export PATH="$PATH:~/Applications/swift-4.0-RELEASE-ubuntu16.04/usr/bin/"
apt-get install curl
apt-get install clang
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
<?xml version="1.0"?> | |
<root> | |
<name username="JS1">John</name> | |
<name username="MI1">Morka</name> | |
</root> |
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 generate-word.core-test | |
(:require [clojure.test :refer :all] | |
[generate-word.core :refer :all] | |
[clojure.string :as str])) | |
(def cities1 ["ABBAYE" "ABBAYE ST-JEAN" "ABBE FOURE" "ABBE HUCHET" "ABBE LORIN" "ABBE PIERRE LEROY" "ABBE POUSSIN" "ABLETTE" "ABREUVOIR" "ACACIAS" "ACADIENS" "ACHILLE" "AIGUILLE" "AJONCS" "ALAUX" "ALBATROS" "ALBERT" "ALBERT 1er" "ALCYON" "ALET"]) | |
(def cities ["ABBAYE" "ABBAYE ST-JEAN" "ABBE FOURE" "ABBE HUCHET" "ABBE LORIN" "ABBE PIERRE LEROY" "ABBE POUSSIN" "ABLETTE" "ABREUVOIR" "ACACIAS" "ACADIENS" "ACHILLE" "AIGUILLE" "AJONCS" "ALAUX" "ALBATROS" "ALBERT" "ALBERT 1er" "ALCYON" "ALET" "ALGER" "ALLENDE" "ALSACE" "AMANDIERS" "AMARYLLIS" "AMAZONE" "AMIRAL EPRON" "AMIRAL LEVERGER" "AMIRAL MAGON" "AMIRAL PROTET" "AMITIE" "AMOUREUX" "ANCIENS COMBATTANTS" "ANCIENS D'INDOCHINE" "ANDROMEDE" "ANEMONES" "ANJOU" "ANTILLES" "APPOLINE" "ARABIE" "ARCHERS" "ARGENTEUIL" "ARGONAUTES" "ARGONNE" "ARKANSAS" "ARONDEL" "ARROMANCHES" "ARTILLEURS" "ARTIMON" "ARTOIS" "ASFELD" "ASTROL |
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
(let [max 100] | |
(take 100 | |
(for [a (range 1 max) | |
b (range 1 max) | |
c (range 1 max) | |
:when (= (+ (* a a) (* b b)) (* c c))] | |
[a b c]))) |
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
MAX = 100 | |
pythagorean_triples = [(a, b, c) for a in range(2, MAX) for b in range(2, MAX) for c in range(2, MAX) if a*a + b*b == c*c] | |
print(pythagorean_triples) |
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 anonymous-letter.core-test | |
(:require [clojure.test :refer :all] | |
[anonymous-letter.core :refer :all])) | |
(defn decrement-dict [word dictionary] | |
(conj dictionary | |
[word | |
(dec (let [count (get dictionary word)] | |
(if (nil? count) 0 count)))])) |