Skip to content

Instantly share code, notes, and snippets.

View axjack's full-sized avatar

Satoaki Noguchi axjack

View GitHub Profile
library(arules)
library(tidyverse)
data("Groceries")
Groceries %>% summary()
# ルール抽出
aparm <- list(support=0.001,confidence=0.5,minlen=2,maxlen=2)
rules <- apriori(Groceries, parameter = aparm )
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@axjack
axjack / inochino_kagayaki.R
Created August 25, 2020 12:16
inochino_kagayaki.R
th <- seq(-2*pi,2*pi,.01)
x <- cos(th)
y <- sin(th)
#dev.off()
par(pty="s")
plot(0,0,xlim=c(-4,3),ylim=c(-3,2.5),col="white",xlab="",ylab="",main="OSAKA,KANSAI,JAPAN\nEXPO\n2025",sub="")
p <- function(v,cl){polygon(v[1]*x+v[2],v[3]*y+v[4],col=cl,border = cl)}
p(c(1,1,1,1),"red")
@axjack
axjack / toko_cov19.R
Last active August 8, 2020 06:10
所沢市のコロナ感染者数
#rm(list=ls())
# ライブラリのロード
library(tidyverse)
library(rvest)
library(dplyr)
library(lubridate)
options(digits = 2)
@axjack
axjack / test.sh
Created June 23, 2020 13:41
C++のexecファイルにinput.txtを喰わして実行する用のシェルスクリプト
#!/bin/bash
if [ $# -lt 1 ];then
echo "#USAGE:"
echo "./test.sh cpp_exec_file [input.txt]"
exit 0
fi
input_file="input.txt"
if [ $# -eq 2 ]; then
@axjack
axjack / format_telnum.js
Created February 20, 2020 15:03
ハイフンなしの電話番号をハイフンありでフォーマットする
/*
ハイフンなしの電話番号をハイフンありでフォーマットする
thanks to : https://qiita.com/kennyj@github/items/dde3880abb5071f649ab
*/
//S: 電話番号接頭辞集合
let S = ['03', '04', '06', '050', '070', '080', '090', '020', '011', '015', '017', '018', '019', '022', '023', '024', '025', '026', '027', '028', '029', '042', '043', '044', '045', '046', '047', '048', '049', '052', '053', '054', '055', '058', '059', '072', '073', '075', '076', '077', '078', '079', '082', '083', '084', '086', '087', '088', '089', '092', '093', '095', '096', '097', '098', '099', '0120', '0800', '0570', '0990', '0123', '0124', '0125', '0126', '0133', '0134', '0135', '0136', '0137', '0138', '0139', '0142', '0143', '0144', '0145', '0146', '0152', '0153', '0154', '0155', '0156', '0157', '0158', '0162', '0163', '0164', '0165', '0166', '0167', '0172', '0173', '0174', '0175', '0176', '0178', '0179', '0182', '0183', '0184', '0185', '0186', '0187', '0191', '0192', '0193', '0194', '0195', '0197', '0198', '0220', '0223', '0224', '0225', '0226', '0228', '0229', '0233', '0234', '0235',
@axjack
axjack / rpa.md
Created December 17, 2019 12:02
rpa.md

RPA固有の知識

基礎の基礎

  • 全てはキャプチャ&リプレイから始まる
  • シナリオ(の階層)
    • テスト実行リスト
      • テストスイート
        • テストケース
  • 実行
  • 実行結果
  • 画像認識
@axjack
axjack / elapsed_time_plot.r
Created December 10, 2019 12:05
経過時間をプロットする
pc.data <- c("2019-12-10 19:13:10.100",
"2019-12-10 19:13:10.200",
"2019-12-10 19:15:21.344",
"2019-12-10 19:16:25.344",
"2019-12-10 19:16:28.134",
"2019-12-10 19:18:25.56",
"2019-12-10 19:19:31.798"
)
@axjack
axjack / getmydiff.ps1
Created November 28, 2019 13:28
powershellでdiffを取得する、Compare-Objectを使って。
# 比較用CSVをインポートする
$test1 = Import-Csv -Path test1.csv -Encoding Default
$test2 = Import-Csv -Path test2.csv -Encoding Default
# 比較用項目を指定する
$test1_name = $test1 | %{ $_.name }
$test2_name = $test2 | %{ $_.name }
function Get-MyDiffKey {
@axjack
axjack / TransformJinjiArticle.ps1
Created November 13, 2019 10:45
TransformJinjiArticle.ps1
# データの引用:https://www.nikkei.com/article/DGXLMSJJ40701_T11C19A1000000/
$honbun = @'
▽ (2020年1月1日)執行役員副社長総務部・人事室・ペット事業室担当(専務執行役員)竹内明▽ベビー事業本部副本部長兼プレママプロジェクト・こども未来研究所・RDJP担当、執行役員ベビー営業兼マーケティング室長小堀英次▽総務(内部監査室長兼ファミリー・サポート監査役)野水宏江▽ロジスティクスセンター長(総務室長)池田浩孝▽内部監査室長兼ファミリー・サポート監査役(ロジスティクスセンター長)梨本博之
'@
$midashi = "人事、コンビ"
$honbun = $honbun.Replace(" (","(").trim().Replace("`r`n","")
$midashi = $midashi.Replace("人事、","")
$record = $honbun.Remove(0,1).Insert(0,"$midashi,").Replace("▽", "`r`n$midashi,")