- Homebrew
First, install JAVA. Note that Android SDK is not yet supported JAVA 10, so install JAVA 8:
| { | |
| "emojis": [ | |
| {"emoji": "👩👩👧👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "👩‍👩‍👧‍👧", "category": "People & Body (family)", "order": ""}, | |
| {"emoji": "👩👩👧👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "👩‍👩‍👧‍👦", "category": "People & Body (family)", "order": ""}, | |
| {"emoji": "👩👩👦👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "👩‍👩‍👦‍👦", "category": "People & Body (family)", "order": ""}, | |
| {"emoji": "👨👩👧👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "👨‍👩&z |
| (require '[cemerick.url :as url] | |
| '[clojure.spec.alpha :as s] | |
| '[clojure.spec.gen.alpha :as gen] | |
| '[clojure.string :as string]) | |
| (def non-empty-string-alphanumeric | |
| "Generator for non-empty alphanumeric strings" | |
| (gen/such-that #(not= "" %) | |
| (gen/string-alphanumeric))) |
| library(data.table) | |
| ?`[.data.table` | |
| DT <- data.table(x=rep(c("b","a","c"),each=3), y=c(1,3,6), v=1:9) | |
| X <- data.table(x=c("c","b"), v=8:7, foo=c(4,2)) | |
| colnames(DT) | |
| # [1] "x" "y" "v" |
| # data from http://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/population-distribution-demography/geostat | |
| # Originally seen at http://spatial.ly/2014/08/population-lines/ | |
| # So, this blew up on both Reddit and Twitter. Two bugs fixed (southern Spain was a mess, | |
| # and some countries where missing -- measure twice, submit once, damnit), and two silly superflous lines removed after | |
| # @hadleywickham pointed that out. Also, switched from geom_segment to geom_line. | |
| # The result of the code below can be seen at http://imgur.com/ob8c8ph | |
| library(tidyverse) |
| ;; Example: Send A Signed Multi-Part Media HTTP POST Request With Clojure | |
| ;; | |
| ;; Keywords: Clojure, Twitter API, media/upload, OAuth 1.0, multipart/form-data, Authorization, Signed Request | |
| ;; | |
| ;; Dependencies: [clj-http "2.2.0"] [clj-oauth "1.5.5"] | |
| ;; | |
| ;; Description: | |
| ;; The code is meant to read well as an example, not be idiomatic or efficiently organized. | |
| ;; | |
| ;; I am leaving the raw materials here, put it together how you'd like it! |
| (ns simple-compojure.core | |
| (require | |
| [ring.adapter.jetty :refer [run-jetty]] | |
| [ring.middleware.params :as p] | |
| [simple-compojure.middleware :as m] | |
| [simple-compojure.routes :as r] | |
| )) | |
| (def app | |
| (-> r/routes |
| (require '[clojure.core.async :as a]) | |
| (def xform (comp (map inc) | |
| (filter even?) | |
| (dedupe) | |
| (flatmap range) | |
| (partition-all 3) | |
| (partition-by #(< (apply + %) 7)) | |
| (flatmap flatten) | |
| (random-sample 1.0) |
Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.