This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
plot = open("|gnuplot","w") | |
plot.puts "set xrange [0:6.3]\n" | |
for i in 1..600 | |
plot.puts "plot sin(x - #{i * 0.1}) notitle\n" | |
plot.flush | |
sleep(1.0/60.0) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'popup) | |
(defun yas/popup-prompt (prompt choices &optional disp-fn) | |
(defun memq-index (elem list) | |
(defun memq-index-iter (list index) | |
(cond ((atom list) (and (eq elem list) index)) | |
((eq elem (car list)) index) | |
(t (memq-index-iter (cdr list) (+ 1 index))))) | |
(memq-index-iter list 0)) | |
(let* ((formatted-choices |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
convert -coalesce -delay 0 -loop 0 -deconstruct \ | |
\( -geometry 48x48 -roll +1+0 $1 \) \ | |
\( -geometry 48x48 $1 \) ${1%%.*}-furueru.gif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC = g++ | |
OBJS = linpack.o com.o randlib.o | |
.PHONY: all clean | |
all: librandlib.a | |
librandlib.a: $(OBJS) | |
ar cr librandlib.a $(OBJS) | |
ranlib librandlib.a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env gosh | |
(use util.match) | |
(use file.util) | |
(use gauche.sequence) | |
(define (usage program) | |
(print #`"usage: ,|program| filename num...")) | |
(define (main args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; (require 'rainbow-hl-line) | |
;;; (rainbow-hl-line-mode 1) | |
(defgroup rainbow-hl-line nil "rainbow-hl-line custom group") | |
(defcustom rainbow-hl-line-color-list | |
(list "red4" "orange4" "yellow4" "green4" "blue4" "magenta4") | |
"color list" | |
:type '(repeat string) | |
:group 'rainbow-hl-line) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
normalize <- function(col) { | |
m <- col - mean(col) | |
v <- var(col) | |
if(v == 0){ | |
return(m) | |
}else{ | |
return(m/sqrt(v)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mecab --node-format="%f[7] " | nkf -w --hiragana | sed 's/EOS//g' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# -*- mode: sh-mode; -*- | |
import `date +%Y-%m-%d-%H:%M:%S`.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
new_icon=$1 | |
old_icon=$2 | |
composite_icon_name=$3 | |
percentage=35 | |
size=`identify $new_icon | cut -d' ' -f3 | cut -d'x' -f1` | |
resize_size=$(($size * $percentage / 100)) | |
geometry=$(($size - $resize_size)) |
OlderNewer