Skip to content

Instantly share code, notes, and snippets.

View yutannihilation's full-sized avatar
🍣
Nobody loves you

Hiroaki Yutani yutannihilation

🍣
Nobody loves you
View GitHub Profile
@yutannihilation
yutannihilation / wolframalpha.md
Created August 30, 2015 03:15
Wolfram Languageを使ってみる

データ型

配列?

ドキュメントがうまく見つけられないので以下は推測。

同じ型の値しかもたない。

[1, 2, 3]
---
title: |
Plots the Histograms by Faceting
rdname: ggally_facethist
date: 2015-06-06
output: html_document
layout: article
category: ggally
images:
FRONTFOMATTER_IMAGES
@yutannihilation
yutannihilation / charlieprexing3.ino
Last active August 29, 2015 14:20
An example Arudino code of charlieplexing. For details about charlieplexing, read this: http://en.wikipedia.org/wiki/Charlieplexing
// referenced this code: http://www.instructables.com/id/Charlieplexed-Arduino-8x8-LED-Grid-Display-Shield-/step2/Code/
const int UPPERPIN = 13;
const int LOWERPIN = 11;
void setup() {
resetAllPins();
}
void loop() {
for(int i=LOWERPIN;i<=UPPERPIN;i++){
@yutannihilation
yutannihilation / armhf-rocker.sh
Last active August 29, 2015 14:18
Run Rocker's Docker images on http://instantcloud.io
# Servers on scaleway are arm, where official Rocker images won't work.
# To make things work, we have to start with onlinelabs/armhf-debian and build Docker image by ourselves.
#
# $ wget -O - https://gist.github.com/yutannihilation/4a00ab73d0864e30392f/raw/armhf-rocker.sh | sh
#
set -xe
mkdir -p r-base rstudio
docker pull onlinelabs/armhf-debian:jessie
---
title: "邪智暴虐なエクセル王を倒そう readxl版"
author: "Hiroaki Yutani"
date: "2015/3/23"
output: html_document
---
e-Statの邪智暴虐っぷりに打ちのめされていた私ですが、uri氏がやってくれました。
[邪智暴虐なエクセル王を倒そう](http://rpubs.com/uri-sy/fury_to_estat)
# No responsiveness
chartist(data, day) +
Line(x_labelInterpolationFnc = JS_interp(4, offset = 2))
# responsiveness
chartist(data, day) +
Line(x_labelInterpolationFnc = JS_interp(4, offset = 2)) +
Line(x_labelInterpolationFnc = JS_interp(13, offset = 2), responsive_query = "screen and (min-width: 641px) and (max-width: 1024px)")
library(rvest)
library(httr)
library(dplyr)
library(purrr)
# get URLs of detail pages
get_links <- function(num) {
url <- sprintf("http://www.botswanatourism.co.bw/accommodation?field_facility_region_tid=All&title=&page=%d", num)
links <- html(url) %>%
@yutannihilation
yutannihilation / R6.R
Created February 22, 2015 03:15
R6を試したメモ
library(R6)
methods(class = "R6")
#> [1] print.R6*
#>
#> Non-visible functions are asterisked
Numbers <- R6Class("Numbers",
public = list(
x = 100
library(dplyr)
library(purrr)
library(ggplot2)
e <- asNamespace('ggplot2')
Geoms <- grep("^Geom.+", ls(e), value = TRUE)
geoms <-
Geoms %>%
map(~ get(., envir = e))