Skip to content

Instantly share code, notes, and snippets.

View kidapu's full-sized avatar
:octocat:
On vacation

kidapu kidapu

:octocat:
On vacation
  • 21:35 (UTC +09:00)
View GitHub Profile
@kidapu
kidapu / cjpeg mozjpeg optimize.sh
Last active August 8, 2022 02:01
cjpeg mozjpeg optimize
#!/bin/sh
rate=10
srcdir='org'
destdir='optimized'$rate
mkdir $destdir
for inpath in `\find $srcdir -name '*.jpg' -or -name '*.png' `; do
@kidapu
kidapu / ReadMe.md
Last active June 14, 2022 01:48
facetype.js( https://github.com/gero3/facetype.js ) の node.js で動く版
npm install 
node main.js
@kidapu
kidapu / trimming.py
Last active November 13, 2019 00:52
floodfill image
import numpy as np
import matplotlib.pyplot as plt
import cv2
import glob
pathes = glob.glob('./datas/input/*.jpg')
for path in pathes:
print(path)
@kidapu
kidapu / mv
Last active December 7, 2019 07:18
リサイズするとき便利だよ
count=0
for inpath in `\find /Volumes/20190915/bb -name '*.JPG' `; do
outpath=${inpath/bb/dd}
@kidapu
kidapu / convert-from-utf8str-to-utf16-ascii-char.cpp
Last active August 2, 2019 15:43
Touch Designer が日本語うけとれないらしいので?、文字列をutf16 ascii char に変換 in cpp
#include <iostream>
#include <codecvt>
#include <sstream>
// https://onlineutf8tools.com/convert-utf8-to-utf16
// https://cpprefjp.github.io/lang/cpp11/char16_32.html
using namespace std;
/*
* eos - A 3D Morphable Model fitting library written in modern C++11/14.
*
* File: examples/fit-model-simple.cpp
*
* Copyright 2015 Patrik Huber
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@kidapu
kidapu / brightness.h
Created October 2, 2017 16:53
brightneess
#pragma once
#include "ofMain.h"
// lib
#include "ofxGui.h"
#include "ofxKinectV2.h"
#include "format.h"
class Const
@kidapu
kidapu / ffmpeg-trimming.sh
Last active September 3, 2017 00:58
movie trimming for training yolo
#!/bin/sh
# 縦 x 横
width=1280
height=720
# crop
crop='720:720:0:0'
crop2='720:720:510:0'
@kidapu
kidapu / root-ro
Last active April 28, 2020 04:09 — forked from sbonfert/root-ro
Read-only Root-FS with overlayfs for Raspian
#!/bin/sh
#
# Read-only Root-FS for Raspian
#
# Modified 2016 by Stefan Bonfert to make it compatible with Raspbian
# Jessie (vanilla).
#
# Modified 2015 by Pascal Rosin to work on raspian-ua-netinst with
# overlayfs integrated in Linux Kernel >= 3.18.
#
@kidapu
kidapu / convert-mp4.sh
Last active December 2, 2016 06:35
convert-mp4
#!/bin/sh
echo "Hello"
for file in *.m4v
do
echo "-------------"
echo "CONVERT $file"
ffmpeg -vcodec "h264" -i "$file" "./output/$file.mp4"
# ffmpeg -i "$file" -vf scale=960:540 "./output/$file.mp4"