Skip to content

Instantly share code, notes, and snippets.

@PallCreaker
PallCreaker / file0.txt
Created October 24, 2016 02:42
R(統計) 変数毎に基本統計量(summary)を算出する。int,num,factorに対応。 ref: http://qiita.com/PallCreaker/items/17008c97ad4536f4d512
> output <- mySummary(iris)
> output
colnames class inform sum sd mean Min Median Max NA.s
2 Sepal.Length numeric <NA> 876.5 0.8281 5.8433 4.3 5.8 7.9 0
3 Sepal.Width numeric <NA> 458.6 0.4359 3.0573 2 3 4.4 0
4 Petal.Length numeric <NA> 563.7 1.7653 3.758 1 4.35 6.9 0
5 Petal.Width numeric <NA> 179.9 0.7622 1.1993 0.1 1.3 2.5 0
6 Species factor setosa:50, versicolor:50, virginica:50 <NA> <NA> <NA> <NA> <NA> <NA> 0
# install package
install.packages("dplyer", dependencies = TRUE)
install.packages("data.table", dependencies = TRUE)
install.packages("reshape2", dependencies = TRUE)
install.packages("ranger", dependencies = TRUE)
install.packages("randomForest", dependencies = TRUE)
install.packages("MASS", dependencies = TRUE)
install.packages("kohonen", dependencies = TRUE)
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
Rails.application.load_tasks
namespace :unicorn do
##
@PallCreaker
PallCreaker / gist:40d5d1150b8af035e368
Created August 13, 2014 05:19
front end campまとめ資料
https://gist.github.com/st44100/d7a92d35fcd9b2fb9bc6
http://www.slideshare.net/yutoyoshinari/ss-37936903
@PallCreaker
PallCreaker / file0.txt
Created April 22, 2014 05:51
GitHubのissue番号を自動でcommitに書き、issue番号がないコミットははじくようにするgit hooksまとめ! ref: http://qiita.com/PallCreaker/items/c91bc201fb8562c8fbd3
[pall@pall:~](79_imgAddAltTag)$ git st
# On branch 79_imgAddAltTag
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: README.md
#
[pall@kazumasa:~](79_imgAddAltTag)$ git commit -m "test"
コミットにチケット情報入れてーーー
@PallCreaker
PallCreaker / gist:10824442
Created April 16, 2014 07:31
sudo -s のbashの設定
# .bashrc
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# Source global definitions
if [ -f /etc/bashrc ]; then
sudo find . -type f -name "*.*" | xargs grep --color "pre.lancers"
@PallCreaker
PallCreaker / gist:9948520
Created April 3, 2014 05:00
url の変換。
<?php $this->Html->scriptStart(array('inline' => false)); ?>
$(function(){
$(".pagination li.paginateChild a").each(function() {
var origin_link = $(this).attr('href');
console.log(origin_link);
var link = "/place" + origin_link; $(this).attr("href", link);
@PallCreaker
PallCreaker / gist:9035615
Last active August 29, 2015 13:56
画像のクリックで_on _offを切り替える  ホバーのものっけとくよ!!!
//click
<a href="javascript:void(0)">
<img src="./../img/button/radio_off.png" alt="off" class="imgChange" /><input type="hidden" value=""/>
</a>
<script type="text/javascript">
$(function(){
$(".imgChange").click(function(){
var imgSrc = $(this).attr("src");
@PallCreaker
PallCreaker / gist:8488267
Created January 18, 2014 09:41
cakephp for gitignore
# Test URI
# Ignore private folder
/app/private/*
!/app/private/empty
# Ignore packed asset files
/app/webroot/css/packed/*
!app/webroot/css/packed/.htaccess
/app/webroot/js/packed/*