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/bash | |
# coding: utf-8 | |
# twitcast.sh by dyama | |
if [ -n "$1" ]; then | |
id=$(echo "$1" | sed 's|^.*/||g') | |
fname="${id}_$(date +'%F_%H-%M-%S').ts" | |
ffmpeg -i "http://twitcasting.tv/$id/metastream.m3u8" \ | |
-vcodec copy -acodec copy -f mpegts "$fname" | |
else |
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
# Windows (notepad) like keybinding for nano editor | |
# Modified by dyama, Original code written by zonuexe, | |
# license under GPLv3 or NYSL(0.9982) | |
# lastupdate: h261124 | |
# | |
# how to install | |
# a. rename and move this file to $HOME/.nanorc | |
# % mv nanorc.keybindings $HOME/.nanorc | |
# b. concatenate this file with tail of $HOME/.nanorc | |
# % cat nanorc.keybindings >> $HOME/.nanorc |
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/bash | |
for file in `find . -type f -name '*.md' | xargs -I{} basename {} | sed 's/\.md$//g'` | |
do | |
( | |
echo '<!--#include file="head.html" -->' | |
markdown $file.md | |
echo '<!--#include file="foot.html" -->' | |
) > $file.html | |
chmod 644 $file.html |
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
/* | |
HSPによるライフゲームサンプル | |
参考文献: | |
『C言語による最新アルゴリズム辞典』奥村晴彦著/技術評論社 | |
『人工生命の世界』服部桂/オーム社 | |
*/ | |
#define ScreenX 160 | |
#define ScreenY 120 |
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
q = np.array([ | |
[1, 0, 0, -width/2], | |
[0, 1, 0, -height/2], | |
[0, 0, 0, focal_length], | |
[0, 0, -1/tx, 0] | |
]) | |
_points, _colors = calc_point_cloud(image, disp, q) | |
points = list(_points) | |
colors = list(_colors) |
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/python | |
# coding: utf-8 | |
import numpy as np | |
import cv2 | |
from matplotlib import pyplot as plt | |
img_left = cv2.imread("l.jpg",0) | |
img_right = cv2.imread("r.jpg",0) | |
img_left = cv2.GaussianBlur(cv2.equalizeHist(img_left), (3,3), 0) | |
img_right = cv2.GaussianBlur(cv2.equalizeHist(img_right) ,(3,3), 0) |
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 | |
# coding: utf-8 | |
if [ $# -gt 0 ]; then | |
for file in “$@” | |
do | |
if [ -f “$file” -a -s “$file” ]; then | |
# Get file extention | |
ext=`basename “$file” | sed ‘s/^.*\.\(.*\)$/\1/gi’`; | |
if [ “$file” == $ext ] ; then |
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/ruby | |
# coding: utf-8 | |
ts = {} | |
as = [] | |
(`chasen source.txt`).each_line do |line| | |
as.push line.split(/\t/)[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
; ookiihou wo kaesu max kansuu | |
(defun ooki (x y) | |
(if (> x y) | |
x | |
y)) | |
; fibonacchi suu wo kaesu | |
(defun fib (n) | |
(if (< n 2) | |
n |
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
; ookiihou wo kaesu max kansuu | |
defun ooki (x y) | |
if (> x y) | |
x | |
y | |
; fibonacchi suu wo kaesu | |
defun fib (n) | |
if (< n 2) | |
n |
NewerOlder