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
#!/usr/bin/python | |
import cv2 | |
import glob | |
import numpy as np | |
import os | |
import sys | |
""" | |
2019-02-18 |
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
# TODO shebang and exec flag | |
import cv2 | |
import glob | |
import numpy as np | |
import os | |
import sys | |
"""calc diff compared with next jpg. | |
usage: python diff.py PATH | |
""" |
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
#!/usr/bin/python3 | |
import numpy as np | |
import cv2 | |
import datetime | |
from time import sleep | |
cap = cv2.VideoCapture(0) | |
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1920) | |
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 1080) |
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
list=`ls` | |
for var in $list | |
do | |
echo $var | |
exiftool $var > ${var}.txt | |
done |
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 sys | |
import binascii | |
''' python3 bin.py INPUT.JPG OUTPUT ''' | |
input = open(sys.argv[1], "rb") | |
data = input.read() | |
input.close() | |
app2_mark = bytes([0xFF, 0xE2]) |
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
var uri = "http://localhost:8080/reinput?key=1234-5678-90ab-cdef"; | |
var reg = /\\??key=[0-9a-f\\-]+/; | |
if (uri.match(reg)) { | |
console.log("matched"); | |
var replaced = uri.replace(reg, "key=hoge"); | |
console.log(replaced); | |
} else { | |
console.log("unmatched"); | |
} |
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
#!/usr/bin/ruby | |
class Custom | |
def self.get_log(old_value, new_value) | |
if old_value == "0000000000000000000000000000000000000000" | |
git_log = `git log --stat #{new_value}` | |
else | |
git_log = `git log --stat #{old_value}..#{new_value}` | |
end | |
end |
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
DB = Sequel.sqlite('photo/photo.db') | |
photo = DB[:photo].all | |
for year in 2000..Date.today.year do | |
puts " -- " + year.to_s + " -- " | |
start = year.to_s + '-01-01' | |
end = (year + 1).to_s + '-01-01' | |
photo = DB[:photo].where('date_time >= ? and date_time < ?', start, end).all | |
puts photo | |
end |
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
#!/bin/bash | |
# boot script for alfresco for Ubuntu 14.04 | |
ALFRESCO_HOME="/opt/alfresco" | |
case "$1" in | |
start) | |
sudo -u alfresco date >> ${ALFRESCO_HOME}/boot.log | |
sudo -u alfresco ${ALFRESCO_HOME}/alfresco.sh start 2>&1 >> ${ALFRESCO_HOME}/boot.log | |
;; |
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
find . -name .DS_Store | xargs rm |
NewerOlder