Skip to content

Instantly share code, notes, and snippets.

View informationsea's full-sized avatar

Yasunobu Okamura informationsea

View GitHub Profile
@informationsea
informationsea / gist:5142463
Last active December 14, 2015 20:18
Install python modules without root access. (Japanese)

root権限無しにPythonモジュールをインストールする

Pythonでは virtualenv を使う事でroot権限無しにモジュールのインストールが出来るようになる.目的別に環境を作る事が出来るので,モジュールを試しにインストールする時にも有用.

virtualenvのインストール

#include <avr/io.h>
#include <avr/boot.h>
#include <util/delay.h>
#include <avr/signature.h>
#include <avr/pgmspace.h>
#include <stdint.h>
#include <stdbool.h>
#include <avr/eeprom.h>
// #include <usart.h>
@informationsea
informationsea / install-R.md
Last active December 16, 2015 06:39
How to install R (Japanese)

Rのインストール

  1. 一番簡単な方法

R for mac から R-3.x.x.pkg (latest version) をダウンロードする.

この方法の場合には Xcode や Xquartz をインストールする必要はコンパイルが必要なモジュールを入れない限り無い. モジュールをインストールする場合にはコンパイルが必要な事があるので MacPorts を使う方法の1〜3をやっておくと良い.

@informationsea
informationsea / paperlist.py
Created April 16, 2013 06:32
Generate HTML paper list from PubMed ID list
#!/usr/bin/env python
__author__ = 'OKAMURA Yasunobu'
__license__ = 'GPLv3+'
from Bio import Entrez
import argparse
import re
from xml.sax.saxutils import escape
@informationsea
informationsea / .zshrc
Last active September 8, 2016 14:49
zshrc
# -*- shell-script -*-
# private paths
if [ -f $HOME/.zsh.d/private-path.sh ];then
source $HOME/.zsh.d/private-path.sh
fi
# load system configuration
if [ -f "/etc/profile" ];then
source /etc/profile
@informationsea
informationsea / dot-install.sh
Created April 17, 2013 09:56
Install dot files from repository. This script create symbolic links from all files starts with "dot_" in current directory to a home directory.
#!/bin/bash
DOTFILES=`find "$PWD" -mindepth 1 -maxdepth 1 -name "dot_*"`
TIME=`LANG=C date`
pushd "$HOME"
for i in $DOTFILES;do
NEWNAME=`basename "$i" | sed -e "s|^dot_|$HOME/.|"`
if [ -L "$NEWNAME" ];then
@informationsea
informationsea / split-fasta.py
Created May 30, 2013 08:20
Split FASTA file to individual entries
#!/usr/bin/env python
import Bio.SeqIO
import argparse
import re
import os.path
def cleanup_text(name):
"""
@informationsea
informationsea / memory
Last active December 20, 2015 20:29
Plugin to monitor the memory on a OS X system (Mavericks supported)
#!/bin/sh
# -*- sh -*-
#: =cut
#
#=head1 NAME
#
#load - Plugin to monitor the memory on a system.
#
#=head1 AUTHOR
@informationsea
informationsea / qtar
Last active December 20, 2015 21:48
tar for GridEngine
#!/bin/sh
#$ -S /bin/sh
#$ -cwd
if [ "$JOB_ID" ];then # in grid engine
tar "$@"
else
qsub -N "qtar-`basename $PWD`" -l s_vmem=0.5G,mem_req=0.5 $0 "$@"
fi
@informationsea
informationsea / apachelogdb.py
Created August 21, 2013 11:31
Import apache combine log to sqlite3
#!/usr/bin/env python
import argparse
import sqlite3
import csv
import gzip
import bz2
import datetime
def prepare_database(conn):