Skip to content

Instantly share code, notes, and snippets.

@atusy
atusy / yusha.ipynb
Last active February 13, 2021 14:47
イニフィニティNumpy 2章Q19(応用):魔王と勇者のデータサイエンス
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@atusy
atusy / tabset.Rmd
Created January 10, 2021 04:10
Navigate tabsets from ToC (tabs must be named uniquely)
---
title: "minidown::mini_document"
author: "Atsushi Yasumoto"
date: "`r Sys.Date()`"
output:
html_document:
toc: true
toc_float: true
self_contained: false
pandoc_args: ["--lua-filter", "tabset.lua"]
@atusy
atusy / foldableCodeBlcok.Rmd
Last active March 7, 2020 08:24
Fold code blocks with Pandc Lua Filter originally posted to https://blog.atusy.net/2020/03/07/pandoc-lua-detailed-codeblock/ in Japanese
---
output:
html_document:
pandoc_args: [
"--lua-filter", "foldableCodeBlock.lua"
]
---
```{r, attr.output='.details summary="Output"'}
set.seed(1)
@atusy
atusy / pandoc.css
Created June 29, 2019 22:55
Embedded CSS by Pandoc 2.7.3 when numberLines is used.
<style type="text/css" data-origin="pandoc">
code.sourceCode > span { display: inline-block; line-height: 1.25; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode { white-space: pre; position: relative; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
---
output: html_document
---
```{r, fig.width = 7, fig.height = 4, cache = TRUE}
library(readr)
library(ggplot2)
library(patchwork) # remotes::install_github("thomasp85/patchwork")
d <- read_csv("https://gist.githubusercontent.com/atusy/eca1f1acb31720896660a9926adab756/raw/5b4643dabb9499459cedb0673ad4fe780568143d/example4geom-col.csv")
p <- ggplot(d, aes(x, n)) + geom_col(width = 1)
@atusy
atusy / example4geom-col.csv
Created February 18, 2019 13:16
Example data for geom_col with missing teeth
x n
884 1
892 1
896 1
900 1
904 1
908 1
912 1
916 2
920 1
@atusy
atusy / deparse_level.md
Created January 16, 2019 00:41
deparse.level parameter of combining functions
library(bench)
library(ggplot2)
a <- 1:3
rbind(a, a)
#>   [,1] [,2] [,3]
#> a    1    2    3
#> a    1    2    3
rbind(a, a, deparse.level = 0)
#&gt; [,1] [,2] [,3]
---
title: "Enjoy patchwork"
output: html_notebook
---
```{r setup, include = FALSE}
library(dplyr)
library(ggplot2)
library(patchwork)
```
@atusy
atusy / docker-compose.verride.yml
Created September 20, 2018 07:27
docker-compose.override.yml for Growi with HackMD
version: '3'
services:
##
# HackMD(CodiMD) container
# see https://github.com/hackmdio/codimd#configuration
#
hackmd:
build:
context: ./hackmd
@atusy
atusy / docker-compose.yml
Last active September 20, 2018 07:26
docker-compose.yml for Growi with HackMD integration
version: '3'
services:
app:
build:
context: .
dockerfile: ./Dockerfile
ports:
- 3000:3000 # localhost only by default
links: