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/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Copyright (c) 2009 Keiichiro Nagano | |
# Copyright (c) 2009 Kimura Youichi | |
# Copyright (c) 2006-2008 Ricardo Garcia Gonzalez | |
# Copyright (c) 2008 Ying-Chun Liu (PaulLiu) | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a | |
# copy of this software and associated documentation files (the "Software"), |
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/env python3 | |
import multiprocessing | |
import subprocess | |
accounts =[ | |
{'id':'1@example.com', 'pass':'password'}, | |
{'id':'2@example.com', 'pass':'password'}, | |
] | |
def download(account, download_urls): |
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.path | |
filename = input('CSV filename: ') | |
data = open(filename).readlines() | |
name, ext = os.path.splitext(filename) | |
out = open(name+'_ok'+ext, 'w') | |
outdata = '' | |
for row in data: | |
outrow = row.replace('\n','').replace('\r','').replace('\'','').replace('"','') |
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/env python3 | |
#coding:utf-8 | |
#require bitstring | |
import bitstring | |
import math | |
import sys | |
filename = sys.argv[1] | |
packet_length = 188 |
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/env python3 | |
#coding:utf-8 | |
#require bitstring | |
import bitstring | |
import math | |
import sys | |
filename = sys.argv[1] | |
packet_length = 188 |
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/env python3 | |
#coding:utf-8 | |
#require bitstring | |
import bitstring | |
from sys import argv | |
import math | |
import sys | |
import io | |
import time |
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/env python3 | |
#coding:utf-8 | |
import json | |
import random | |
import time | |
try: | |
from gi import pygtkcompat | |
except ImportError: | |
pygtkcompat = None |
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/env python3 | |
from PIL import Image | |
from datetime import datetime | |
imgname = input(); | |
img = Image.open(imgname) | |
#DateTimeOriginal のExif tag ID | |
taken_datetime_exif = img._getexif()[0x9003] |
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 | |
cat renamedirs.txt | while read DIRN | |
do | |
FILENAME=`ls -1 $DIRN | sed -n '1p'` | |
YEAR=`echo ${DIRN}/${FILENAME} | python3 photodir_year.py` | |
echo "renaming ${DIRN}" | |
mv $DIRN ${DIRN}_${YEAR} | |
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
// CONFIG | |
#pragma config FOSC = INTRCCLK // Oscillator Selection bits (INTOSC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN) | |
#pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled and can be enabled by SWDTEN bit of the WDTCON register) | |
#pragma config PWRTE = ON // Power-up Timer Enable bit (PWRT enabled) | |
#pragma config MCLRE = OFF // MCLR Pin Function Select bit (MCLR pin function is digital input, MCLR internally tied to VDD) | |
#pragma config CP = OFF // Code Protection bit (Program memory code protection is disabled) | |
#pragma config CPD = OFF // Data Code Protection bit (Data memory code protection is disabled) | |
#pragma config BOREN = ON // Brown-out Reset Selection bits (BOR enabled) | |
#pragma config IESO = OFF // Internal External Switchover bit (Internal External Switchover mode is disabled) | |
#pragma config FCMEN = OFF // Fail-Safe Clock Monitor Enabled bit (Fail-Safe Clock Monitor is disabled) |