Skip to content

Instantly share code, notes, and snippets.

# include <Siv3D.hpp>
void Main()
{
const Texture texture(L"Assets/img.png");
const int x[] = { 153, 265, 369, 465, 571, 673, 782 };
const int f[] = { 63, 150, 330, 1000, 3300, 10000 }; // Hz
Window::SetTitle(L"笑点");
Window::Resize(texture.width, texture.height);
#! ruby -Ku
# coding: utf-8
def init
@filename = "self-control.mkv"
bpm = 140
t8 = 60.0 / (bpm * 2)
ss2 = 31.870
ss1 = ss2 + t8 * 2 * 62
ss0 = ss2 + t8 * 2 * 72
digraph G {
dpi=192;
// rankdir=LR;
node [fontname="Yu Gothic Bold"];
"熱い熱い" -> "命";
"熱い熱い" -> "気持ち";
"赤い赤い" -> "血潮";
"赤い赤い" -> "夕日";
"命" -> "ファンキーガッツマン";
"気持ち" -> "ファンキーガッツマン";
#!/bin/bash
ffmpeg -i thrill.mkv -vf "scale=8:6, pad=800:600:396:297:black" -t 19 out.mp4
# coding: utf-8
# reference:
# Python+OpenCVで重心を求める
# http://www.cellstat.net/pycvmoment/
import cv2
def centroid(path_in, path_out, is_inv=True):
img = cv2.imread(path_in)
#! ruby -Ku
# coding: utf-8
# ref.
# パスポート申請用写真の規格(平成28年4月20日更新) | 外務省
# https://www.mofa.go.jp/mofaj/toko/passport/ic_photo.html
# PDF to PNG – Convert PDF to PNG Online
# https://pdf2png.com/
def sys(e)
\version "2.18.2"
\header {
title = "仮装大賞 得点(15点)"
composer = " "
}
\paper {
indent = 0
}
# coding: utf-8
# reference:
# ハフ変換による直線検出 — OpenCV-Python Tutorials 1 documentation
# http://labs.eecs.tottori-u.ac.jp/sd/Member/oyamada/OpenCV/html/py_tutorials/py_imgproc/py_houghlines/py_houghlines.html
import glob
import cv2
import numpy as np
#! ruby -Ku
# encoding: utf-8
# generation loss
# usage: ruby gl.rb in.jpg [repeat_num] [step] [seed] [range_min] [range_max]
in_jpg = ARGV[0]
repeat_num = ARGV[1].nil? ? 1000 : ARGV[1].to_i
step = ARGV[2].nil? ? 10 : ARGV[2].to_i
seed = ARGV[3].nil? ? 12345 : ARGV[3].to_i
#!/bin/bash
# reference
# Fred's ImageMagick Scripts: THERMOGRAPHY
# http://www.fmwconcepts.com/imagemagick/thermography/index.php
#
# Developed by Fred Weinhaus 2/19/2013 .......... revised 5/3/2015
#
# ------------------------------------------------------------------------------