Skip to content

Instantly share code, notes, and snippets.

🚀

c060604 c060604

🚀
Block or report user

Report or block c060604

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@c060604
c060604 / exif.py
Created May 23, 2017
User python and piexif to write some gps info into jpg pictures.
View exif.py
import os
import piexif
from fractions import Fraction
def to_deg(value, loc):
"""convert decimal coordinates into degrees, munutes and seconds tuple
Keyword arguments: value is float gps-value, loc is direction list ["S", "N"] or ["W", "E"]
return: tuple like (25, 13, 48.343 ,'N')
"""
@c060604
c060604 / validate_code.py
Created Oct 20, 2015 — forked from pylemon/validate_code.py
django: validate code
View validate_code.py
#coding=utf-8
import random
from PIL import Image, ImageDraw, ImageFont, ImageFilter
_letter_cases = "abcdefghjkmnpqrstuvwxy" # 小写字母,去除可能干扰的i,l,o,z
_upper_cases = _letter_cases.upper() # 大写字母
_numbers = ''.join(map(str, range(3, 10))) # 数字
init_chars = ''.join((_letter_cases, _numbers))
You can’t perform that action at this time.