Skip to content

Instantly share code, notes, and snippets.

# General aliases
#alias rm='rmtrash'
alias rm='/usr/local/bin/rmtrash'
alias remove='/bin/rm'
alias cdr='cd `git rev-parse --show-toplevel`'
alias up='cd ..'
alias upp='cd ../../'
alias uppp='cd ../../../'
alias v='vim'
<keymap version="1" name="custom" parent="Mac OS X 10.5+">
<action id="$Redo">
<keyboard-shortcut first-keystroke="shift meta z" />
</action>
<action id="ActivateDatabaseToolWindow">
<keyboard-shortcut first-keystroke="ctrl g" second-keystroke="ctrl d" />
</action>
<action id="ActivateRoutesToolWindow">
<keyboard-shortcut first-keystroke="ctrl g" second-keystroke="r" />
</action>
@saboyutaka
saboyutaka / Makefile
Last active April 15, 2017 05:52
bench Makefile
.DEFAULT_GOAL := help
APP_HOST=
bm: confirm-app-host ## Run Benchmark
@echo "$(date '+[%Y/%m/%d %H:%M:%S]') `/opt/go/bin/benchmarker -t http://${APP_HOST}/ -u /opt/go/src/github.com/catatsuy/private-isu/benchmarker/userdata`" | tee -a result.log
bm-inf: confirm-app-host ## Run Benchmark Infinity
@while true; do echo "$(date '+[%Y/%m/%d %H:%M:%S]') `/opt/go/bin/benchmarker -t http://${APP_HOST}/ -u /opt/go/src/github.com/catatsuy/private-isu/benchmarker/userdata`" | tee -a result.log; done;
confirm-app-host:
@saboyutaka
saboyutaka / titanic_predict.rb
Created March 20, 2017 05:03
PyCallで機械学習
require 'pycall/import'
include PyCall::Import
pyimport "pandas", as: :pd
# kaggleのtitanicのデータで機械学習
# https://www.kaggle.com/c/titanic
# データの読み込み(トレーニングデータとテストデータにすでに分かれていることに注目)
df_train = pd.read_csv.('./data/train.csv')
df_test = pd.read_csv.('./data/test.csv')
@saboyutaka
saboyutaka / titanic.ipynb
Created March 20, 2017 05:03
Kaggle titanicで機械学習
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@saboyutaka
saboyutaka / titanic.ipynb
Last active March 18, 2017 03:02
Pycallを使ってRubyで機械学習
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@saboyutaka
saboyutaka / about.tpl
Created February 24, 2017 04:38
Bottleのfirst step
% rebase('base.tpl', title='About')
<h1>About</h1>
<p>
about about about
</p>
@saboyutaka
saboyutaka / base.tpl
Last active December 23, 2021 16:40
Bottle CSS importing
%#ベースとなる大枠のHTML要素
<html>
<head>
<link rel="stylesheet" type="text/css" href="static/style.css">
<title>{{title or 'No title'}}</title>
</head>
<body>
%# ここにrebaseしたテンプレートが入る。この場合make_table.tplの内容がここに入る。
{{!base}}
</body>
@saboyutaka
saboyutaka / todo.py
Last active February 14, 2017 11:52
import sqlite3
from bottle import route, run, debug, template, request
import datetime
import pprint
@route('/todo')
@route('/')
def todo_list():
# データベースに接続
conn = sqlite3.connect('todo.db')
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.