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
@python -x "%~f0" %* & exit /b %errorlevel% | |
########################################################### | |
# FFmpegを使って動画ファイルを連結する | |
# | |
# このスクリプトはWindows向けで、`%AppData%\Microsoft\Windows\SendTo`に配置します。 | |
# ファイル右クリックのコンテキストメニュー`送る`内にメニューが追加されるので、そこから起動します。 | |
# | |
# pythonとFFmpegがインストールされ、パスが通っている必要があります。 | |
# |
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
import os | |
import shutil | |
ROOT_DIR = "N:/documents" | |
def remove(path): | |
if os.path.isfile(path): | |
os.remove(path) | |
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
from datetime import date | |
import pyauto | |
from keyhac import * | |
def configure(keymap): | |
configure_blobal(keymap) | |
def configure_blobal(keymap): | |
keymap_global = keymap.defineWindowKeymap() |
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
> contour gpsの動画からnmeaを抜き出す | |
> | |
> usage : groovy extractNmea.groovy INPUT_FILE_PATH | |
> output : カレントディレクトリに「拡張子抜きのファイル名」.nmeaが出力される。 | |
def filePath = args[0]; | |
def file = new File(filePath); | |
def fileName = file.getName() | |
def outFileName = "out/" + fileName.substring(0, fileName.lastIndexOf(".")) + ".nmea" |
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
import logging | |
import glob | |
import os | |
from os import path | |
from datetime import datetime | |
import subprocess | |
import re | |
# ドラレコ動画をタイムラプス化したときのコード | |
# |
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
# coding=utf-8 | |
import logging | |
import sys | |
import subprocess | |
import os | |
import textwrap | |
logging.basicConfig(level=logging.DEBUG) | |
LOGGER = logging.getLogger(__name__) |
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
# coding: utf-8 | |
# | |
# テキストファイルを複数のQRコードに変換する | |
# keepassのクレデンシャルを紙に印刷するときについでにxmlもQRコードとして残そうとした時に作ったもの | |
# 依存モジュールは以下の通り | |
# | |
# pip install pillow qrcode | |
# |
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
import pyaudio #録音機能を使うためのライブラリ | |
import wave #wavファイルを扱うためのライブラリ | |
import datetime | |
import numpy as np | |
import cv2 | |
import datetime | |
import concurrent.futures | |
import ffmpeg | |
from pprint import pprint |
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
#pip install ffmpeg-python | |
import ffmpeg | |
in_file = ffmpeg.input('output.avi') | |
in_wave = ffmpeg.input('1554859795.wav') | |
( | |
ffmpeg |
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
import numpy as np | |
import cv2 | |
import datetime | |
cap = cv2.VideoCapture(0) | |
ret, frame = cap.read() | |
if ret==True: | |
frame = cv2.flip(frame,0) | |
print(frame.shape) |
NewerOlder