Skip to content

Instantly share code, notes, and snippets.

View malanjp's full-sized avatar
🏠
Working from home

malan malanjp

🏠
Working from home
View GitHub Profile

Keybase proof

I hereby claim:

  • I am malanjp on github.
  • I am malanjp (https://keybase.io/malanjp) on keybase.
  • I have a public key whose fingerprint is 5FE5 0457 9AC8 1DC8 4F75 D4DC C651 8709 2781 7EFC

To claim this, I am signing this object:

"Settings
" Check Gist automatically and update settings
set autoupdategist
" Do not focus an input field when a page is loaded
set noautofocus
" Key of <Leader> (Default: "\")
let mapleader = ","
" Characters for Hit-a-Hint (Default: "asdfgqwertzxcvb")
let hintcharacters = "hjklasdfgyuiopqwertnmzxcvb"
" qmarks
sudo apt-get install libmysqlclient-dev
pip install MySQL-python
# python3 build dependences
aptitude install sqlite3 libsqlite3-dev libbz2-dev
- hosts: all
user: vagrant
sudo: yes
tasks:
- name: locale settings
command: apt-get install language-pack-ja
command: export LANG=ja_JP.UTF-8
command: update-locale LANG=ja_JP.UTF-8
command: locale-gen
- hosts: 192.168.100.10
user: malan
sudo: yes
tasks:
- name: Install common packages
command: aptitude install git mosh tmux zsh wget -y
tags: common
- name: Install OpenJRE-7
apt: openjdk-7-jre-headless
- hosts: 192.168.100.10
user: malan
sudo: yes
tasks:
- name: install common applications
action: apt pkg={{ item }} state=installed update-cache=yes
tags: common
with_items:
- git
- mosh
[~]$ sh bench.sh
count = 1
== mongo ==
insert count 100000
update = 23.48549485206604
insert = 23.634454011917114
== mysql ==
insert count 100000
every commit = 36.17432904243469
atomic = 10.844573974609375
for i in `seq 1 1 5`; do
echo 'count = '$i
echo '== mongo =='
python mongo_bench.py
echo '== mysql =='
python mysql_bench.py
echo '---'
done
# -*- coding: utf-8 -*-
import MySQLdb
from datetime import datetime
import time
limit = 100000
print('insert count {0}'.format(limit))
class Timer(object):
def __init__(self, verbose=False):