You'll need to make 2 plots and use grid.arrange
if you want more uniform spacing in 8.1 and 8.2. You can add a fill to strip.background
to extend the background colors and rotate the text with strip.text
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
slide_windows <- function(tbl, doc_var, window_size) { | |
tbl %>% | |
group_by(!!doc_var) %>% | |
mutate(WordId = row_number() - 1, | |
RowCount = n()) %>% | |
ungroup() %>% | |
crossing(InWindowIndex = 0:(window_size-1)) %>% | |
filter((WordId - InWindowIndex) >= 0, # starting position of a window must be after the beginning of the document | |
(WordId - InWindowIndex + window_size - 1) < RowCount # ending position of a window must be before the end of the document | |
) %>% |
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
# the --recursive is important, this has a submodule! | |
git clone --recursive https://github.com/asciinema/asciicast2gif.git | |
cd asciicast2gif | |
# If you forget to use --recursive you can do | |
git submodule init | |
git submodule update | |
# install npm dependencies | |
npm install |
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
library(ggplot2) | |
library(igraph) | |
library(ggraph) | |
library(scales) | |
library(ggforce) | |
network_theme <- theme_no_axes() + | |
theme(panel.border = element_blank()) | |
theme_set(network_theme) |
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
# https://www.r-graph-gallery.com/283-the-hourly-heatmap.html | |
library(ggplot2) | |
library(dplyr) # easier data wrangling | |
library(viridis) # colour blind friendly palette, works in B&W also | |
library(Interpol.T) # will generate a large dataset on initial load | |
library(lubridate) # for easy date manipulation | |
library(ggExtra) # because remembering ggplot theme options is beyond me | |
library(tidyr) |
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
#!/usr/bin/ruby | |
# For an OO language, this is distinctly procedural. Should probably fix that. | |
require 'json' | |
details = Hash.new({}) | |
capture_params = [ | |
{ :name => "title", :message => "Enter project name." }, | |
{ :name => "url", :message => "Enter the URL of the project repository." }, |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
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
$ git config --global core.excludesfile ~/.gitignore | |
$ echo .DS_Store >> ~/.gitignore |
NewerOlder