This file contains 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
#lang racket | |
(define word-list (list "помада" "ревность" "сыр" "солнце" "трава")) | |
(define (words-knock-together word-list) | |
(when (> (length word-list) 1) | |
(map (lambda (x) | |
(displayln (string-append (first word-list) " " x)) | |
;(displayln (string-append x " " (first word-list))) | |
) (rest word-list)) |
This file contains 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
first_date_by_cmonth <- function(cmonth, base_year = 2017) { | |
require(magrittr) | |
require(dplyr) | |
require(purrr) | |
data.frame( | |
index = seq(1, length(cmonth)), | |
year = floor((cmonth - 1) / 12) + base_year, | |
month = cmonth %% 12, |
This file contains 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
# Combine histogram scater and barchart in one plot | |
top_hist <- ggplot(dataset, aes(date, shipped)) + geom_col() + | |
theme(axis.ticks=element_blank(), panel.background=element_blank(), | |
axis.text.x=element_blank(), axis.title.x=element_blank(), | |
axis.title.y=element_blank()) | |
right_hist <- ggplot(dataset) + geom_histogram(aes(shipped), binwidth = 1) + coord_flip() + | |
scale_x_continuous(expand=c(0, 0)) + scale_y_continuous(expand=c(0, 0)) + | |
theme(axis.ticks=element_blank(), panel.background=element_blank(), | |
axis.text.y=element_blank(), axis.title.y=element_blank()) + ylab('') |
This file contains 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
urls <- c( | |
"http://stat.ethz.ch/R-manual/R-devel/library/base/html/connections.html", | |
"http://en.wikipedia.org/wiki/Xz", | |
"xxxxx" | |
) | |
readUrl <- function(url) { | |
out <- tryCatch( | |
{ | |
# Just to highlight: if you want to use more than one | |
# R expression in the "try" part then you'll have to |
This file contains 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
// Random heights | |
var selectedLayers = context.selection; | |
var loop = [selection objectEnumerator]; | |
while (layer = [loop nextObject]) { | |
layer.frame().setConstrainProportions(false); | |
var fNoise = 20 * Math.random(); | |
layer.frame().setHeight(fNoise); | |
} |
This file contains 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
/** | |
* 585 buttons | |
*/ | |
body { | |
background: #ffffff; | |
min-height: 100%; | |
text-align: center; | |
} | |
button { | |
height: 30px; |
This file contains 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
/** | |
* 585 buttons | |
*/ | |
body { | |
background: #ffffff; | |
min-height: 100%; | |
text-align: center; | |
} | |
button { | |
height: 30px; |
This file contains 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
/** | |
* 585 buttons | |
*/ | |
body { | |
background: #ffffff; | |
min-height: 100%; | |
text-align: center; | |
} | |
button { | |
height: 30px; |
This file contains 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
/** | |
* Button hover appearance test | |
*/ | |
html { | |
text-align: center; | |
font-family: Proxima Nova, san-serif; | |
background: #f06; | |
background: url('http://d.pr/i/10AsQ+'); | |
min-height: 100%; |
This file contains 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
/** | |
* Button hover appearance test | |
*/ | |
html { | |
text-align: center; | |
font-family: Proxima Nova, san-serif; | |
background: #f06; | |
background: url('http://d.pr/i/10AsQ+'); | |
min-height: 100%; |
NewerOlder