View removeAppleDouble.py
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: |
View config.py
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() |
View extractNmea.groovy
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" |
View timelapser.py
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 | |
# ドラレコ動画をタイムラプス化したときのコード | |
# |
View genRegFile.py
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__) |
View text2qr.py
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 | |
# |
View videorecorder.py
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 |
View merge.py
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 |
View video.py
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) |
View record.py
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
PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl を探してきてpip installしておく |
NewerOlder