Skip to content

Instantly share code, notes, and snippets.

@iwatake2222
iwatake2222 / matplotlib_animation_draw_artist.py
Created October 18, 2017 12:56
Fast matplotlib heatmap animation
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
main.py
"""
__author__ = "take-iwiw"
__copyright__ = "Copyright 2017, take-iwiw"
__date__ = "18 Oct 2017"
import logging
@iwatake2222
iwatake2222 / matplotlib_animation.py
Created October 18, 2017 12:59
Several ways for matplotlib heatmap animation
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
main.py
"""
__author__ = "take-iwiw"
__copyright__ = "Copyright 2017, take-iwiw"
__date__ = "18 Oct 2017"
import numpy as np
@iwatake2222
iwatake2222 / openmp.c
Created October 21, 2017 03:36
OpenMP sample for Visual Studio
#include "stdafx.h"
#include "omp.h"
/*
* DO NOT FORGET TO ENABLE OPEN MP
* right click on project -> Properties -> C/C++ -> Language
* Open MP Support = Yes
*/
@iwatake2222
iwatake2222 / convJpeg2Movie.bat
Created November 6, 2017 05:38
Combine JPEG files to a MPEG file using FFMPEG
rem @echo off
setlocal ENABLEDELAYEDEXPANSION
set FFMPEG="C:\\asd\\tool\\ffmpeg-20170827-ef0c6d9-win64-static\\bin\\ffmpeg"
set /a FPS = 7
rem set OPTION=-vf vflip
set OPTION = ""
cd /d %~dp1
@iwatake2222
iwatake2222 / convMts2Mp4.bat
Created November 6, 2017 06:25
Convert MTS files to MP4 files
rem @echo off
setlocal ENABLEDELAYEDEXPANSION
set FFMPEG="C:\\asd\\tool\\ffmpeg-20170827-ef0c6d9-win64-static\\bin\\ffmpeg"
cd /d %~dp1
for %%f in (%1\*.MTS) do (
%FFMPEG% -i %%f -vcodec copy -acodec copy %%f.mp4
)
@iwatake2222
iwatake2222 / convResizeMp4.bat
Created November 6, 2017 08:29
Resize movie image size using ffmpeg
rem @echo off
setlocal ENABLEDELAYEDEXPANSION
set FFMPEG="C:\\asd\\tool\\ffmpeg-20170827-ef0c6d9-win64-static\\bin\\ffmpeg"
set /a HEIGHT=1080
cd /d %~dp1
for %%f in (%1\*.mp4) do (
@iwatake2222
iwatake2222 / .vscode_sftp.json
Last active July 1, 2018 12:18
ラズパイ用のC/C++開発環境をお手軽に構築する ref: https://qiita.com/take-iwiw/items/46119bb7d41c6030d34f
{
"host": "192.168.1.88",
"port": 22,
"username": "pi",
"password": "rasp",
"protocol": "sftp",
"agent": null,
"privateKeyPath": null,
"passphrase": null,
"passive": false,
@iwatake2222
iwatake2222 / file0.txt
Last active December 5, 2017 04:43
ラズパイでフレームバッファ(/dev/fb0)を使用して、直接ディスプレイ画像を入出力する ref: https://qiita.com/take-iwiw/items/0a7a2fefec9d93cdf6db
cat /dev/fb0 > aaa.raw
@iwatake2222
iwatake2222 / file0.txt
Last active December 6, 2017 04:40
Python + Scrapyで画像を巡回取得する ref: https://qiita.com/take-iwiw/items/be292150316a3ca033eb
scrapy startproject test_scrapy
cd test_scrapy
@iwatake2222
iwatake2222 / alt_tab.py
Created December 14, 2017 14:23
1秒おきにアクティブwindowをランダムに切り替える。 チャットなどの無操作オフライン防止
# -*- coding: utf-8 -*-
import sys
import os
import time
import pyautogui
import random
###
# Main
###