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
def ARG_SDF = new java.text.SimpleDateFormat("yyyy-MMdd-HHmm-ss", java.util.Locale.US); | |
def LOG_SDF = new java.text.SimpleDateFormat("dd/MMM/yyyy:HH:mm:ss Z", java.util.Locale.US); | |
def logFile = new File(args[0]); | |
def startTime = ARG_SDF.parse(args[1]); | |
def endTime = ARG_SDF.parse(args[2]); | |
def scanner = new java.util.Scanner(logFile); | |
while (scanner.hasNextLine()) { | |
def line = scanner.nextLine(); |
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
<!doctype html> | |
<html> | |
<!-- | |
* KanTanMarkdown | |
* Copyright (c) 2016 tatesuke | |
* Released under the MIT license | |
* https://github.com/tatesuke/KanTanMarkdown/blob/master/LICENSE | |
--><head> | |
<meta charset="utf-8"> | |
<style>#previewer:after,nav:after{content:".";display:block;font-size:0;clear:both;visibility:hidden}body{margin:0;padding:0;position:relative}body.onDragover{border:5px dashed #99cde1}nav{margint:0}nav #leftNav{float:left}nav #rightNav{float:right}nav:after{height:0}#attach{width:100%;border-top:1px solid gray;border-bottom:1px solid gray;display:none}#attach #attachForm{box-sizing:border-box;width:100%;height:100%;display:none}#attach #attachForm input[type=file]{width:100%}#attach #filer{box-sizing:border-box;width:100%;height:150px;overflow:auto;display:none}#attach #filer input{width:300px}#attach #pasteArea{box-sizing:border-box;width:100%;border:1px solid gray;text-align:center}#attach #attachToggleButton,#attach #previewToggleButton{width:50%}#wrapper{overflow:auto}#wrapper #editorTabWrapper{bo |
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
<?php | |
class PageUtil { | |
private $values = array(); | |
public function put($name, $value) { | |
$this->values[$name] = $value; | |
} | |
public function val(...$names) { |
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 math | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import cv2 | |
import math | |
img = cv2.imread("test.bmp", 0) | |
rhoMax = int(math.hypot(img.shape[0], img.shape[1])) |
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 psutil | |
# sbattery(percent=100, secsleft=<BatteryTime.POWER_TIME_UNLIMITED: -2>, power_plugged=True) | |
# sbattery(percent=100, secsleft=4294967295, power_plugged=False) | |
import psutil | |
battery = psutil.sensors_battery() | |
print(battery.power_plugged) |
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しておく |
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) |
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 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
import piexif | |
import re | |
import datetime | |
class GpsIdf(object): | |
def __init__(self, gpsIdf): | |
self.gpsIdf = gpsIdf |