Skip to content

Instantly share code, notes, and snippets.

View TeraokaAkihiro's full-sized avatar

Teraoka Akihiro TeraokaAkihiro

View GitHub Profile
@TeraokaAkihiro
TeraokaAkihiro / convert_realesr_H265.bat
Created September 10, 2022 02:37
convert video with realesrgan-ncnn-vulkan
@echo off
:nextfile
if "%~s1"=="" goto end
if exist tmp_frames/ (del /q tmp_frames) else (mkdir tmp_frames)
if exist out_frames/ (del /q out_frames) else (mkdir out_frames)
if exist %~s1 ffmpeg -i "%~s1" -qscale:v 1 -qmin 1 -qmax 1 -vsync 0 tmp_frames/frame%%08d.jpg
"./realesrgan-ncnn-vulkan.exe" -i tmp_frames -o out_frames -n realesr-animevideov3 -s 2 -f jpg
if exist %~s1 FOR %%i IN ("%~s1") DO ( ffmpeg -framerate 24 -i out_frames/frame%%08d.jpg -i "%~s1" -map 0:v:0 -map 1:a:0 -c:a copy -c:v libx265 -pix_fmt yuv420p %%~di%%~piconv_%%~ni%%~xi )
shift
goto nextfile
@TeraokaAkihiro
TeraokaAkihiro / file0.txt
Created November 26, 2018 12:54
JScriptでExcelファイルを編集する ref: https://qiita.com/Teaki/items/39d8333e4c8ddb6950fa
var ExcelApp = new ActiveXObject("Excel.Application");
ExcelApp.Visible = true;
ExcelApp.DisplayAlerts = false;
var WB = ExcelApp.Workbooks.Open("[Excelファイルのパス]");
var WS = WB.Worksheets(1);
WS = WB.Worksheets("シート名");
@TeraokaAkihiro
TeraokaAkihiro / renban_rename_pad.bat
Created November 7, 2018 14:29
hk03ne/renban_rename.batの桁数指定バージョン
@echo off
setlocal enabledelayedexpansion
:: hk03neさんの桁数指定バージョン : 複数ファイルを一括で連番付きファイル名にリネームするバッチファイル
:: https://gist.github.com/hk03ne/3edd7b5c6a276c2bf6268a9248c8b484
:: 連番(整数)
set /a INT_INDEX=1
:: 連番を0で桁揃えする長さ
set /p PAD_LENGTH="0で桁揃えする長さ : "
@TeraokaAkihiro
TeraokaAkihiro / file0.txt
Created August 21, 2018 13:59
WindowsのWSLで始める競技プログラミング(C++) ref: https://qiita.com/teraokaakihiro/items/f051c81809135b0cec84
$ sudo apt install g++
@TeraokaAkihiro
TeraokaAkihiro / LoockChange.cs
Last active July 4, 2018 04:22
【Unity】カメラから見えなくなったときの判定方法 ref: https://qiita.com/teraokaakihiro/items/5e8f74ac3685d4937a5b
using UnityEngine;
public class LookChange : MonoBehaviour {
private bool fMaterial = false;
[SerializeField]
private Material mat01;
[SerializeField]
private Material mat02;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using VRTK.Highlighters; //usingは忘れがちなので忘れずに
public class SetOutline : MonoBehaviour {
VRTK_OutlineObjectCopyHighlighter vrtk_outline;
void Start ()
@TeraokaAkihiro
TeraokaAkihiro / TileController.cs
Created August 26, 2017 08:24
WallpaperEngine向け、タイル表示
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TileController : MonoBehaviour {
public GameObject tilePrefab;
public GameObject[,] tile;
private int tileX,tileY;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@TeraokaAkihiro
TeraokaAkihiro / MouseMover
Created April 28, 2017 06:51
物理挙動でマウスに追尾するスクリプト
using UnityEngine;
public class MouseMover : MonoBehaviour {
public float speed; // 大きい程早く動く
private GameObject obj;
private Rigidbody2D rb;
void Start ()
@TeraokaAkihiro
TeraokaAkihiro / clockController.cs
Last active May 9, 2017 05:01
Unityでアナログ時計を動かしてみる。 ref: http://qiita.com/teraokaakihiro/items/ccaca6872e4515c2bf1c
using System; // DateTimeに必要
using System.Collections;
using UnityEngine;
public class clockController : MonoBehaviour {
public bool sec; // 秒針の有無
public bool secTick; // 秒針を秒ごとに動かすか
public GameObject hour;